Sciweavers

IWMM
2007
Springer

Detecting and eliminating memory leaks using cyclic memory allocation

14 years 5 months ago
Detecting and eliminating memory leaks using cyclic memory allocation
We present and evaluate a new technique for detecting and eliminating memory leaks in programs with dynamic memory allocation. This technique observes the execution of the program on a sequence of training inputs to find   -bounded allocation sites, which have the property that at any time during the execution of the program, the program accesses at most only the last   objects allocated at that site. If the difference between the number of allocated and deallocated objects from the site grows above   throughout the computation, there is a memory leak at that site. To eliminate the leak, the technique transforms the program to use cyclic memory allocation at that site: it preallocates a buffer containing   objects of the type allocated at that site, with each allocation returning the next object in the buffer. At the end of the buffer the allocations wrap back around to the first object. Cyclic allocation eliminates any memory leak at the allocation site — the total amount of ...
Huu Hai Nguyen, Martin C. Rinard
Added 08 Jun 2010
Updated 08 Jun 2010
Type Conference
Year 2007
Where IWMM
Authors Huu Hai Nguyen, Martin C. Rinard
Comments (0)