#1412: Memory leak on development branch ------------------------------------+--------------------------------------- Reporter: hopper.seth@… | Owner: eschnett Type: defect | Status: new Priority: major | Milestone: Component: Carpet | Version: development version Resolution: | Keywords: ------------------------------------+---------------------------------------
Comment (by eschnett):
... and here we go -- the latest results! Looking at SystemStatistics (thanks, Ian!), in particular at {{{ int uordblks This is the total size of memory occupied by chunks handed out by malloc. int fordblks This is the total size of memory occupied by free (not in use) chunks. }}} uordblks is remaining constant at 800 MB, fordblks is increasing linearly in time at a rate of about 100 MB / 256 iterations.
This means that malloc is not reusing memory, and thus the overhead of libc increases with time. We encountered this before; the communication pattern of CarpetIOASCII triggered this. We introduced "memory pools" where we allocated large chunks of memory ahead of time, serving this when allocating the communication buffers, and freeing them when CarpetIOASCII is finished. This works fine.
I assume we need to do the same for some other thorn. Don't know yet where.