Interface ISessionMemoryAllocator
Allocates and frees blocks within an execution session's memory space, and reports allocation and fragmentation statistics.
public interface ISessionMemoryAllocator
Remarks
⚖️RDCore provides an implementation of this interface licensed under GPLv3.
Properties
Info
Current allocation and fragmentation statistics for this session's memory space.
SessionMemoryInfo Info { get; }
Property Value
Methods
TryAllocate(int, out MemoryAddress)
Allocates the specified number of bytes in the memory space of this session.
bool TryAllocate(int size, out MemoryAddress address)
Parameters
sizeintThe desired size of the allocation.
addressMemoryAddressThe start of the allocated address space.
Returns
- bool
trueif the specified number of bytes can be allocated,falseotherwise.
TryDeallocate(MemoryAddress, out SessionMemoryBlock)
Frees the block starting at address.
bool TryDeallocate(MemoryAddress address, out SessionMemoryBlock block)
Parameters
addressMemoryAddressblockSessionMemoryBlock