Font Size: a A A

Design And Implementation Of A Memory Allocator

Posted on:2009-06-29Degree:MasterType:Thesis
Country:ChinaCandidate:Z G HanFull Text:PDF
GTID:2178360308479400Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Most C/C++ dynamic memory allocators or heap memory functions built-in development tools run very slowly, and at the same time, their page performance is depressing. Although many professional memory allocators perform well, they are not commonly used, and their design technology is disguised in deep below.In this paper, design and implementation of a memory allocator, named HLP, are presented, which can run on many platforms, such as Windows, Linux, Unix, or even can run on some embedded systems as well. It is not based on any single principle concerning memory management, but on heap layers plus memory pools. For easy scalable and understanding sake, I designed and implemented a much detailed architecture of HLP, which is easy to maintain.In the process of development, the basic algorithms such as bitmap, boundary tags and segregated lists are skillfully improved and put into practice. The improved bitmap and boundary tags have no space overhead, and the segregated lists become bins after improvement, which can decrease internal fragmentation drastically.Considering the possibility of difficulty to understand HLP in detail for most programmers, a uniform interface is provided. Therefore, the programmers are happily to use it with ease.As expected, the testing results told us that HLP not only ran much faster than its counterparts did but also showed a better page performance. Generally, it improves performance by up to 3-130 times versus malloc/free, with a decreasing page faults 7%-37% compared to malloc/free.
Keywords/Search Tags:HLP, heap layer, pool, bitmap, boundary tags, bins
PDF Full Text Request
Related items