YAMI4 Core Library 2.0.0
Messaging Solution for Distributed Systems
|
Non-locking (thread-unsafe) block-based allocator. More...
#include <allocator.h>
Public Member Functions | |
void | set_working_area (void *buf, std::size_t size) |
virtual void * | allocate (std::size_t requested_size) |
virtual void | deallocate (const void *p) |
void | get_free_size (std::size_t &biggest, std::size_t &all) const |
virtual void * | allocate (std::size_t requested_size)=0 |
virtual void | deallocate (const void *p)=0 |
Non-locking (thread-unsafe) block-based allocator.
The block-based allocator operates within the given block of memory. This allocator uses a straightforward implementation with lists of free blocks, which are coalesced at deallocation time. It is appropriate for repeated alloc/dealloc patterns, but is vulnerable to fragmentation with irregular request sequences. This allocator should be protected by a locking wrapper, if intended for use in a multithreading environment.
|
virtual |
Implements yami::core::allocator.
|
virtual |
Implements yami::core::allocator.