PjMalloc - A Persistent Dynamic Memory Allocator

Thesis Type Bachelor
Thesis Status
Student Johannes Strickner
Thesis Supervisor

Dynamic allocation of memory is heavily used in nowadays programming languages. Either it is done explicitly by the programmer like in C or C++ or implicitly by the interpreter or virtual machine like in Python or Java. To explicitly allocate and deallocate memory at runtime a programmer uses allocators. These provide a simple interface for exactly this purpose.
In this thesis the fundamental requirements of an allocator are discussed as well as the various data structures commonly used in nowadays dynamic memory allocators and the commonly known strategies on how to choose a memory block from a pool of available ones. Then various examples for allocator implementations are discusses, before a new persistent dynamic memory allocator is presented. The new allocator, unlike the others, is based on a persistent address space, which maps its memory to the file system. Therefore the allocator provides a programmer with persistent memory, thus eliminating the need to use some kind of persistent storage solution like a database system in many cases. It may also be used to implement an in-memory database system that does not depend on memory image creation to achieve persistence.
Finally the new dynamic memory allocator is compared in terms of performance with the other discussed allocators. Since it is a new dynamic memory allocator with only a view month of development, its source code is not yet fully optimized. As a result, its performance is significantly lower than the erformance of the others, especially for small allocations.