Virtual memory allocator interface used by Cohtml for scripting memory allocations. More...
Public Member Functions | |
IVirtualAllocator () | |
virtual | ~IVirtualAllocator () |
virtual size_t | GetAllocationPageSize () const =0 |
virtual size_t | GetCommitPageSize () const =0 |
virtual void * | Allocate (void *address, size_t size, size_t alignment, int protection, int flags)=0 |
Reserve and/or commit a memory region. More... | |
virtual bool | Free (void *address, size_t size, int flags)=0 |
Releases or decommits a memory region. More... | |
Virtual memory allocator interface used by Cohtml for scripting memory allocations.
cohtml::IVirtualAllocator::IVirtualAllocator | ( | ) |
|
virtual |
|
pure virtual |
Reserve and/or commit a memory region.
address | a hint when reserving memory and a concrete address when commiting. |
size | the number of bytes to allocate. |
alignment | the required alignment for the return address. |
protection | specifies a protection type for the memory region. |
flags | type of the allocation (commit, reserve or reserve & commit). |
|
pure virtual |
Releases or decommits a memory region.
address | a concrete address to release or decommit. |
size | the number of bytes to deallocate. |
flags | type of the deallocation (decommit or release). |
|
pure virtual |
|
pure virtual |