28 void* addr = mmap(
nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0);
29 if (addr == MAP_FAILED) {
33 this->m_length = size;
43 int stat = munmap(ptr, this->m_length);
void * allocate(const FwEnumStoreType identifier, FwSizeType &size, bool &recoverable, FwSizeType alignment=alignof(std::max_align_t)) override
virtual ~MmapAllocator()
Destructor with no arguments.
PlatformSizeType FwSizeType
A MemAllocator implementation class that uses mmap.
Implementation of malloc based allocator.
void deallocate(const FwEnumStoreType identifier, void *ptr) override