perl5ever has asked for the wisdom of the Perl Monks concerning the following question:
I can't just us the 'ps' command because the reported SHARE value is very inaccurate.
All I need to do is to instrument malloc() and free(). Every time malloc() is called (and is successful) increment an accumulator, and every time free() is called, decrement the accumulator accordingly.
Any ideas of how to do this? One idea is to replace the malloc/free routines in the C library (like with LD_PRELOAD), but I've heard that perl can/does implement it's own memory management on top of malloc() and free() so that this may have to be done inside the perl interperter.
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: detrmining the amount of memory a perl process is using
by zwon (Abbot) on Jan 26, 2010 at 19:51 UTC | |
|
Re: detrmining the amount of memory a perl process is using
by foolishmortal (Novice) on Jan 27, 2010 at 15:08 UTC |