I'd like to know if there is any CLI command like "show modules" but for
the memory usage. I'd like to trace the memory usage of a module and see
if it frees the memory like it should. But for this I haven't got any
utils. Have you got an idea of how I can do it?
make a macro for however you are allocating memory (malloc etc), and keep a
global counter of memory allocated, and decrement/increment it on free()
and realloc() etc.
start it off at 0, and query it when you want to find out later how much a
module is using.
either just do this in the module you care about, or do something fancy
like using a __FILE__ macro to determine which counter to incr/decr
depending which module is doing the work.
At 05:17 PM 4/25/2003 +0200, you wrote:
Quote:
Hello,
I'd like to know if there is any CLI command like "show modules" but for
the memory usage. I'd like to trace the memory usage of a module and see
if it frees the memory like it should. But for this I haven't got any
utils. Have you got an idea of how I can do it?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum