Menu

#25 Memory leaks

open
nobody
None
5
2013-01-28
2012-02-07
zszmidla
No

Hi!
I found the memory leak in the UDT library.
the problem occurs when I receive a part of the data,
process that part of the data by some time,
and receive the rest of the data later on.

When I receive all the data in one piece, the problem doesn't exist.

In my opinion th problem is caused by " CUnitQueue::increase()" method (queue.cpp file)
"...
try
{
tempq = new CQEntry;
tempu = new CUnit [size];
tempb = new char [size * m_iMSS];
}
catch (...)
{
delete tempq;
delete [] tempu;
delete [] tempb;

return -1;
}
..."

Queue increases, but doesn't decrease, so memory usage rises a lot.
When connection is closing, the memory isn't released.

How could I resolve that problem?

Discussion


Log in to post a comment.