mf
Media Framework
|
Ring allocator, allocates ring buffer memory. More...
#include <memory.h>
Public Member Functions | |
void * | raw_allocate (std::size_t size, std::size_t align=1) |
void | raw_deallocate (void *ptr, std::size_t size) |
Ring allocator, allocates ring buffer memory.
Allocates given segment of memory, and maps additional same sized segment immediatly after it in virtual memory, which is mapped to the same allocated segment. In the allocated segment seg
, seg[i]
and seg[i+n]
always map to the same data. The segment length n
must be a multiple of the system page size.
void* mf::raw_ring_allocator::raw_allocate | ( | std::size_t | size, |
std::size_t | align = 1 |
||
) |
void mf::raw_ring_allocator::raw_deallocate | ( | void * | ptr, |
std::size_t | size | ||
) |