[Spread-users] Possible memory leak in spread ?

Muthal Sangam sangam at mail.ru
Tue Jun 25 12:14:14 EDT 2002


I used the following method, which i am not too sure is correct. i used ltrace
util
to monitor calls to calloc,malloc,free. I note the address returned by
calloc&malloc
and remember the corresponding size. At free, i lookup the address and find the
size. calloc&malloc adds to memusage, free subtracts. Now, if memusage keeps
on increasing under a steady load, does it mean that there is a mem leak. If yes
then there could be leak in spread. I had a test program, 
connecting/joining/mcasting/exiting a group and memusage slowly kept increasing.

Some libc funcs(strdup for eg) internally allocate mem and expect user code to
free 
it via free(). I ignore a free of an address which has not been seen before.
Note 
that the malloc done by strdup would'nt show as well. I would like to know
whether 
my method is wrong. If no then i can try to trace the leak.

- sangam






More information about the Spread-users mailing list