Hi all,
consider the simple code attached.
I'm using Xenomai 3.1 on a x86_64 CPU, 2GB RAM.
I compile and link the code using "xeno-config --skin=alchemy --cflags"
and "xeno-config --skin=alchemy --ldflags"
* Scenario 1)
#define printf rt_printf commented out (use printf for prints)
Changing the NUM_TASKS value, in top command I see these results:
- NUM_TASKS 2
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
496 480 root S 80068 4% 0% ./test
- NUM_TASKS 4
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
496 480 root S 80204 4% 0% ./test
- NUM_TASKS 5
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
496 480 root S 80272 4% 0% ./test
- NUM_TASKS 6
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
496 480 root S 80340 4% 0% ./test
Virtual memory size increases in a linear way.
* Scenario 2)
#define printf rt_printf not commented (use rt_printf for prints)
Changing the NUM_TASKS value, in top command I see these results:
- NUM_TASKS 2
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
496 480 root S 80068 4% 0% ./test
- NUM_TASKS 4
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
496 480 root S 80204 4% 0% ./test
- NUM_TASKS 5
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
496 480 root S 142M 4% 0% ./test
- NUM_TASKS 6
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
496 480 root S 206M 4% 0% ./test
Starting from a number of tasks > 4, the VMEM got a jump and then
increases very rapidly.
Is it normal? Or I'm misusing the rt_printf?
Thanks in advance, regards
---
Mauro S.