it's possible perl is statically linked. ldd `type -p perl` will show the libperl.so shared library if it's dynamically linked.
valgrind will show actual memory usage. pmap will show shared library segments. you can assume libperl.so code segments are shared. i don't think the data segments are shared. ps is deceptive in that it does not report shared memory savings. http://www.linuxquestions.org/linux/articles/Technical/Understanding_memory_usage_on_Linux http://stackoverflow.com/questions/131303/linux-how-to-measure-actual-memory-usage-of-an-application-or-process -rob On Tue, Sep 7, 2010 at 10:51 AM, Alexandre Jousset <m...@gtmp.org> wrote: > Hi, > > Le 07/09/2010 15:59, Michael Ganz a écrit : >> >> I saw that every interpreter-instance will allocate about 1MB of RAM >> (Linux). >> >> So dealing with about 250 scripts, this allocates about 250 MB of RAM. > > I may be wrong but if I understand correctly, it's 250MB of *virtual* > memory. Not real. libperl.so is loaded once and shared between multiple > instances. > > My 2c, > -- > -- \^/ -- > -- -/ O \--------------------------------------- -- > -- | |/ \| Alexandre (Midnite) Jousset | -- > -- -|___|--------------------------------------- -- >