[Gc] Memory leak in multithreaded application

Christophe Meessen meessen at cppm.in2p3.fr
Thu May 10 23:57:44 PDT 2007


Hello,

I've tested libgc with my client-server application. The single threaded
client works ok without any memory leak.

The multithreaded server application shows a significant steady step
wise memory usage increase that looks like a memory leak.

The server starts a thread for any incomming connection, allocate some
buffers and do some IO operations. The it closes the connection and the
thread stops. Some threads start and stop very quickly before any memory
allocation are done. I call these transactions. After each transaction
all objects are dereferenced so memory usage should be stable on the
average.

When I let it run, I see steady memory usage, and after a few tens of
transactions the memory usage grows by chuck of 5MB. Then again it runs
for 30sec to a minute, and a new chuck is added. The chunck can be up to
 10 MB.

Is this a normal behaviour with gc or is there a memory leak ?


More information about the Gc mailing list