Why rttest allocates 8GB of memory?

asked 2019-11-07 05:28:37 -0600

r7vme gravatar image

updated 2019-11-07 06:13:24 -0600

Hello, i'm going thru rttest ulitity and was wondering why "lock_and_prefault_dynamic()" always locks 8GB of heap memory?

Steps to reproduce: 1. Build as described in README.md 2. Set unlimited memlock user - memlock -1 in /etc/security/limits.conf, relogin 3. Run ./example_loop -i 10000 4. In separate terminal check memory usage by top (RES column)

8GB also mentioned in Real-Time-Programming

From what i understand lock_and_prefault_dynamic() sets allocation options (no trim, no mmap) and then allocates memory in 64*4k chunks until allocation hits NO page faults. The question is why it's always 8GB?

I'm testing on NVIDIA Jetson AGX Xavier which has 16GB ram.

EDIT:

also checked on google cloud VM with 32GB of total ram (no swap). Getting same number 8GB

My Xavier ulimit -a

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 62481
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 81920
cpu time               (seconds, -t) unlimited
max user processes              (-u) 62481
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
edit retag flag offensive close merge delete