|
From: Dirk M. <dm...@gm...> - 2006-08-25 13:27:47
|
On Friday 25 August 2006 13:19, Julian Seward wrote: > Having looked a bit at drd's bitmap code, it looks OK. I have the > impression that the leaking is caused by some higher-level issues > about when/how bitmaps can be discarded, and when not. I suspect it's > probably not hard to track down, but looks like nobody has time to > chase it right now. I've looked further. whenever the application does some new or new[] call, an extra bitmap is allocated, which, due to its size, causes the next new or new[] call to again allocate a new page instead of being merged into the previously allocated block. I've tried to remove the malloc wrapping but that didn't work. I've also noticed that bitmaps are never free'd, apparently because even client free's never cause the associated client bits to be thrown away. For the puprose of drd, I guess we have to assume that the application does not have memory management errors, and therefore free should be able to discard shadow allocations. overall this leads to every allocation causing two entire pages to be allocated and never be free'd, which leads to quickly eating up all available system ressources. I've tried the aspacemngr handling, but it only made it worse. On the bright side, I didn't have to implement freelist handling since free was never called :) Dirk |