Show simple item record

Using Cyclic Memory Allocation to Eliminate Memory Leaks

dc.date.accessioned2005-12-22T02:40:21Z
dc.date.accessioned2018-11-24T10:24:39Z
dc.date.available2005-12-22T02:40:21Z
dc.date.available2018-11-24T10:24:39Z
dc.date.issued2005-10-26
dc.identifier.urihttp://hdl.handle.net/1721.1/30579
dc.identifier.urihttp://repository.aust.edu.ng/xmlui/handle/1721.1/30579
dc.description.abstractWe present and evaluate a new memory management technique foreliminating memory leaks in programs with dynamic memoryallocation. This technique observes the execution of the program on asequence of training inputsto find m-bounded allocation sites,which have the property that at any time during the execution of theprogram, the program accesses at most only the last m objects allocated atthat site. The technique then transforms the program to usecyclic memory allocation at that site: it preallocates a buffercontaining m objects of the type allocated at that site, with eachallocation returning the next object in the buffer. At the end of thebuffer the allocations wrap back around to the first object. Cyclicallocation eliminates any memory leak at the allocation site - thetotal amount of memory required to hold all of the objects everallocated at the site is simply $m$ times the object size.We evaluate our technique by applying it to several widely-used opensource programs. Our results show that it is able to successfullyeliminate important memory leaks in these programs. A potentialconcern is that the estimated bounds m may be too small, causing theprogram to overlay live objects in memory. Our results indicate thatour bounds estimation technique is quite accurate in practice,providing incorrect results for only one of the 160 m-bounded sitesthat it identifies. To evaluate the potential impact ofoverlaying live objects, we artificially reduce the bounds at$m$-bounded sites and observe the resulting behavior.The resulting overlayingof live objects often does not affect thefunctionality of the program at all; even when it does impairpart of the functionality, the program does not fail andis still able to acceptably deliver the remaining functionality.
dc.format.extent10 p.
dc.format.extent20338887 bytes
dc.format.extent816035 bytes
dc.language.isoen_US
dc.titleUsing Cyclic Memory Allocation to Eliminate Memory Leaks


Files in this item

FilesSizeFormatView
MIT-CSAIL-TR-2005-069.pdf816.0Kbapplication/pdfView/Open
MIT-CSAIL-TR-2005-069.ps20.33Mbapplication/postscriptView/Open

This item appears in the following Collection(s)

Show simple item record