Large leak in Borland C Builder's Rogue Wave streams library

0 Likes

Problem:

I am using BCB 3 with the included Rogue Wave streams library. BC does not detect a huge leak in these libraries that causes my application to run out of virtual memory over time. Why will you not detect this?

Resolution:

It would appear the that Rogue Wave library  (strstream is part of their standard C library which ships with BCB 3.0) is continually allocating memory off the stack when using dynamic memory allocation in the strstream object - but that it only returns this memory when the application exits.

Bad news for a server app that never exits but definitely different from just a straight heap allocation memory leak like char* pMemoryLeak = new char[100].

Technically this is not a leak in BoundsChecker's eyes because when the application exits it does return all the allocated memory back to the OS. If you had the VisualC version of BoundsChecker and you were running in Visual C then you would see this clearly if you could instrument these libraries (it's probably a memory leaked leaving scope); however, we can't offer this technology for the C Builder version and there are no plans to in the future.

By the way, the stream leakage is indeed a real memory allocation problem - acknowledged by Inprise.

Old KB# 12241
Comment List
Anonymous
Related Discussions
Recommended