What are the features to consider when developing a dynamic memory allocator?
A dynamic memory allocator is made up of two functions: one allocates memory space; the other frees memory. The allocation reserves some space to serve memory requests. When the free function has been called, the reserved space is freed and can be used to fulfill further requests. For example, let s build a very basic dynamic memory allocator to understand all the trade-offs such a piece of code has to deal with. We will start with some basic definitions and then describe the allocator. Chunk. Let s assume the allocator can give the required memory a chunk of a big memory space. It is easy to understand that the whole space cannot be taken away to serve the first request. Instead, the initial memory space can be split into different chunks of different sizes. Header. When a memory request is made, how do we know that a given piece is big enough? The size has to be kept in memory somewhere. One solution among others is to keep it in a header inside the chunk. This is an element of memor
Related Questions
- Challenging traditional architecture, what innovative features have been incorporated in the Dynamic Tower?
- When will the new filesystem features (ZFS, Dynamic File System) appear in Solaris Express?
- When will the new filesystem features (ZFS, Dynamic File System) appear in Solaris Express?
- What are the features to consider when developing a dynamic memory allocator?
- What features should a tool have to fix memory leaks?
- What features should a tool have to fix memory leaks?