Skip to contentSkip to conversation

pthread_create memory size

Xenomai-help Gilles Chanteperdrix 1 participant 1 message Jul 7, 2009 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 7 lines · Yigal Goldberger

Hi Gilles,
Thanks for your quick reply.
I'd like to give some more details based on some expirements I've made .
I tried an older version of linux and xenomai (linux 2.6.14.7 ) and when I enlarged the requested stack size to 32KB instead of 8KB I saw a **dramatic** reduction in memory consumption per thread (~30MB less!!!). I saw that there is some minimum stack size that if trying to create a thread with a smaller value will end up with the default (2MB ?) .
This improved to some extent the memory usage of my application also in the new version (linux 2.6.29 + new xenoami - recently ported to mpc8272ads by DENX ) , but I am getting the following :

Quoted 8 lines

2.6.14.7 :
application usage : ~31MB

2.6.29.4
application usage : ~180MB

The application is the same in both versions , so I can't think of where ~150MB are comming from ?

As I told you in the previous mail, see /proc/pid/maps to see how the memory is spent.

Signature · 1 line
					    Gilles.