DL Malloc

DL Malloc - DL Malloc The memory allocator you are building...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
DL Malloc The memory allocator you are building is based on Doug Lea’s malloc implementation that is public domain: http://g.oswego.edu/dl/html/malloc.html This allocator is the standard allocator in Linux
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Memory Allocation Errors Explicit Memory Allocation (calling free) uses less memory and is faster than Implicit Memory Allocation (GC) However, Explicit Memory Allocation is Error Prone 1. Memory Leaks 2. Premature Free 3. Double Free 4. Wild Frees 5. Memory Smashing
Background image of page 2
Memory Leaks Memory leaks are objects in memory that are no longer in use by the program but that are not freed . This causes the application to use excessive amount of heap until it runs out of physical memory and the application starts to swap slowing down the system. If the problem continues, the system may run out of swap space. Often server programs (24/7) need to be “rebounced” (shutdown and restarted) because
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Memory Leaks Memory leaks is a problem for long lived applications (24/7). Short lived applications may suffer memory
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 13

DL Malloc - DL Malloc The memory allocator you are building...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online