Quantum 3 3.1.0

Classes | Enumerations | Functions
Quantum.Allocator Namespace Reference

Classes

class  FrameHeap
 A managed type that wraps a heap object and an allocation tracker. More...
 
class  FrameHeapConfig
 Settings for the frame heap. More...
 
struct  FrameHeapVTable
 Equivalent to the FrameHeapVTableManaged but with marshaled function pointers. More...
 
class  FrameHeapVTableManaged
 A class that wraps memory allocation methods to be used in native code parts of the engine. More...
 
struct  Heap
 The Quantum heap is a custom memory allocator that contains rollback-able memory allocations by Quantum user or internal systems. It implements the ITrackableFrameHeap interface for memory leak tracking. More...
 
class  HeapAllocationTrackerExt
 Extension methods for the IHeapAllocationTracker. More...
 
interface  IFrameHeap
 Custom heap interface for allocating memory on the frame. More...
 
interface  IHeapAllocationTracker
 Interface of the heap allocation tracker. More...
 
interface  ITrackableFrameHeap
 Adds memory allocation tracking to the IFrameHeap. More...
 
struct  SimpleHeapAllocTracker
 An allocation tracker for the frame Heap. This implemention is used when HeapTrackingMode.DetectLeaks mode is selected. More...
 
struct  TracedHeapAllocTracker
 An allocation tracker for the frame Heap. This implementation is used when HeapTrackingMode.TraceAllocations mode is selected. More...
 

Enumerations

enum  HeapManagement : byte
 Determines the memory management strategy the Quantum heap will use. More...
 
enum  HeapPageSize : byte
 Determines the size of a heap page. More...
 
enum  HeapSegmentSize : byte
 Determines the size of a heap segment. (Segments are large chunks of contiguous memory the heap allocates from the operating system.) More...
 
enum  HeapTrackingMode : byte
 Determines the degree that frame heap allocations are tracked in debug mode. More...
 

Functions

unsafe delegate IntPtr AllocateAndClearDelegate (Int32 size)
 An memory delegate used by FrameHeapVTableManaged. More...
 
unsafe delegate void AllocateAndClearPtrDelegate (Int32 size, Ptr *outData)
 An memory delegate used by FrameHeapVTableManaged. More...
 
unsafe delegate IntPtr AllocateDelegate (Int32 size)
 An memory delegate used by FrameHeapVTableManaged. More...
 
unsafe delegate void AllocatePtrDelegate (Int32 size, Ptr *outData)
 An memory delegate used by FrameHeapVTableManaged. More...
 
unsafe delegate void ConvertPointerToPtrDelegate (IntPtr ptr, Ptr *outData)
 An memory delegate used by FrameHeapVTableManaged. More...
 
unsafe delegate IntPtr ConvertPtrToPointerDelegate (Ptr ptr)
 An memory delegate used by FrameHeapVTableManaged. More...
 
unsafe delegate IntPtr ExpandDelegate (IntPtr buffer, Int32 currentSize, Int32 newSize)
 An memory delegate used by FrameHeapVTableManaged. More...
 
unsafe delegate void FreeDelegate (IntPtr ptr)
 An memory delegate used by FrameHeapVTableManaged. More...
 
unsafe delegate void FreePtrDelegate (Ptr ptr)
 An memory delegate used by FrameHeapVTableManaged. More...
 

Enumeration Type Documentation

◆ HeapManagement

Determines the memory management strategy the Quantum heap will use.

Enumerator
PageBasedLegacy 

The heap splits its memory into pages and then splits those pages into pools of fixed-size blocks. This heap cannot grow or allocate blocks larger than its page size. (This is the heap from Quantum version 3.0 and earlier.)

PageBased 

The heap splits its memory segments into pages and then splits those pages into pools of fixed-size blocks.

BlockBased 

The heap splits its memory segments directly into variable-size blocks.

◆ HeapTrackingMode

Determines the degree that frame heap allocations are tracked in debug mode.

Enumerator
Disabled 

Heap allocations are not tracked.

DetectLeaks 

Heap allocations are tracked. A comparison between tracked and serialized Ptr values can detect memory leaks.

TraceAllocations 

Heap allocations are tracked, including the stack trace of each allocation. This mode can detect memory leaks and report the exact point in the code where the leaked memory was allocated from. WARNING: tracing allocations can be VERY slow. This mode is not recommended unless a memory leak is being actively debugged.

◆ HeapPageSize

enum Quantum.Allocator.HeapPageSize : byte
strong

Determines the size of a heap page.

◆ HeapSegmentSize

Determines the size of a heap segment. (Segments are large chunks of contiguous memory the heap allocates from the operating system.)

Function Documentation

◆ AllocateDelegate()

unsafe delegate IntPtr Quantum.Allocator.AllocateDelegate ( Int32  size)

An memory delegate used by FrameHeapVTableManaged.

◆ AllocatePtrDelegate()

unsafe delegate void Quantum.Allocator.AllocatePtrDelegate ( Int32  size,
Ptr *  outData 
)

An memory delegate used by FrameHeapVTableManaged.

◆ AllocateAndClearDelegate()

unsafe delegate IntPtr Quantum.Allocator.AllocateAndClearDelegate ( Int32  size)

An memory delegate used by FrameHeapVTableManaged.

◆ AllocateAndClearPtrDelegate()

unsafe delegate void Quantum.Allocator.AllocateAndClearPtrDelegate ( Int32  size,
Ptr *  outData 
)

An memory delegate used by FrameHeapVTableManaged.

◆ FreeDelegate()

unsafe delegate void Quantum.Allocator.FreeDelegate ( IntPtr  ptr)

An memory delegate used by FrameHeapVTableManaged.

◆ FreePtrDelegate()

unsafe delegate void Quantum.Allocator.FreePtrDelegate ( Ptr  ptr)

An memory delegate used by FrameHeapVTableManaged.

◆ ExpandDelegate()

unsafe delegate IntPtr Quantum.Allocator.ExpandDelegate ( IntPtr  buffer,
Int32  currentSize,
Int32  newSize 
)

An memory delegate used by FrameHeapVTableManaged.

◆ ConvertPtrToPointerDelegate()

unsafe delegate IntPtr Quantum.Allocator.ConvertPtrToPointerDelegate ( Ptr  ptr)

An memory delegate used by FrameHeapVTableManaged.

◆ ConvertPointerToPtrDelegate()

unsafe delegate void Quantum.Allocator.ConvertPointerToPtrDelegate ( IntPtr  ptr,
Ptr *  outData 
)

An memory delegate used by FrameHeapVTableManaged.