Table of Contents

Interface ISessionMemoryAllocator

Namespace
RDCore.SDK.Runtime.Abstract.Execution
Assembly
RDCore.SDK.dll

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

SessionMemoryInfo

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

size int

The desired size of the allocation.

address MemoryAddress

The start of the allocated address space.

Returns

bool

true if the specified number of bytes can be allocated, false otherwise.

TryDeallocate(MemoryAddress, out SessionMemoryBlock)

Frees the block starting at address.

bool TryDeallocate(MemoryAddress address, out SessionMemoryBlock block)

Parameters

address MemoryAddress
block SessionMemoryBlock

Returns

bool