Quantum 3 3.0.11

Public Member Functions | List of all members
Quantum.Allocator.ITrackableFrameHeap Interface Reference

Adds memory allocation tracking to the IFrameHeap. More...

Inheritance diagram for Quantum.Allocator.ITrackableFrameHeap:
Quantum.Allocator.IFrameHeap Quantum.Allocator.Heap

Public Member Functions

void * Allocate< T > (int size, T allocTracker)
 Allocates a block of memory of the specified size with an allocation tracker. More...
 
void * AllocateAndClear< T > (int size, T allocTracker)
 Allocates a block of memory of the specified size and clears it with an allocation tracker. More...
 
Ptr AllocateAndClearPtr< T > (int size, T allocTracker)
 Allocates a Ptr for a block of memory of the specified size and clears it with an allocation tracker. More...
 
Ptr AllocatePtr< T > (int size, T allocTracker)
 Allocates a Ptr for a block of memory of the specified size with an allocation tracker. More...
 
void * Expand< T > (void *buffer, int currentSize, int newSize, T allocTracker)
 Expands a memory block in the given buffer to the specified new size with an allocation tracker. More...
 
T * ExpandArray< T, TTracker > (T *buffer, int currentSize, int newSize, TTracker allocTracker)
 Expands an array in the given buffer to the specified new size with an allocation tracker. More...
 
void Free< T > (Ptr ptr, T allocTracker)
 Frees a Ptr for a block of memory with an allocation tracker. More...
 
void Free< T > (void *ptr, T allocTracker)
 Frees a block of memory with an allocation tracker. More...
 
- Public Member Functions inherited from Quantum.Allocator.IFrameHeap
void * Allocate (int size)
 Allocates a block of memory of the specified size. More...
 
void * AllocateAndClear (int size)
 Allocates a block of memory of the specified size and clears it. More...
 
Ptr AllocateAndClearPtr (int size)
 Allocates a Ptr for a block of memory of the specified size and clears it. More...
 
Ptr AllocatePtr (int size)
 Allocates a Ptr for a block of memory of the specified size. More...
 
void * Expand (void *buffer, int currentSize, int newSize)
 Expands a memory block in the given buffer to the specified new size. More...
 
T * ExpandArray< T > (T *buffer, int currentSize, int newSize)
 Expands an array in the given buffer to the specified new size. More...
 
void Free (Ptr ptr)
 Frees a Ptr for a block of memory. More...
 
void Free (void *ptr)
 Frees a block of memory. More...
 
void * Void (Ptr p)
 Converts a Ptr to a void pointer. More...
 
Ptr Void (void *ptr)
 Converts a pointer to a void pointer. More...
 
TPtr * Void< TPtr > (Ptr p)
 Converts a Ptr to a typed pointer. More...
 

Detailed Description

Adds memory allocation tracking to the IFrameHeap.

Member Function Documentation

◆ Allocate< T >()

void* Quantum.Allocator.ITrackableFrameHeap.Allocate< T > ( int  size,
allocTracker 
)

Allocates a block of memory of the specified size with an allocation tracker.

Template Parameters
TThe type of the allocation tracker.
Parameters
sizeThe size of the memory block to allocate.
allocTrackerThe allocation tracker.
Returns
A pointer to the allocated memory block.

Implemented in Quantum.Allocator.Heap.

Type Constraints
T :IHeapAllocationTracker 

◆ AllocatePtr< T >()

Ptr Quantum.Allocator.ITrackableFrameHeap.AllocatePtr< T > ( int  size,
allocTracker 
)

Allocates a Ptr for a block of memory of the specified size with an allocation tracker.

Template Parameters
TThe type of the allocation tracker.
Parameters
sizeThe size of the memory block to allocate.
allocTrackerThe allocation tracker.
Returns
A Ptr for the allocated memory block.

Implemented in Quantum.Allocator.Heap.

Type Constraints
T :IHeapAllocationTracker 

◆ AllocateAndClear< T >()

void* Quantum.Allocator.ITrackableFrameHeap.AllocateAndClear< T > ( int  size,
allocTracker 
)

Allocates a block of memory of the specified size and clears it with an allocation tracker.

Template Parameters
TThe type of the allocation tracker.
Parameters
sizeThe size of the memory block to allocate.
allocTrackerThe allocation tracker.
Returns
A pointer to the allocated and cleared memory block.

Implemented in Quantum.Allocator.Heap.

Type Constraints
T :IHeapAllocationTracker 

◆ AllocateAndClearPtr< T >()

Ptr Quantum.Allocator.ITrackableFrameHeap.AllocateAndClearPtr< T > ( int  size,
allocTracker 
)

Allocates a Ptr for a block of memory of the specified size and clears it with an allocation tracker.

Template Parameters
TThe type of the allocation tracker.
Parameters
sizeThe size of the memory block to allocate.
allocTrackerThe allocation tracker.
Returns
A Ptr for the allocated and cleared memory block.

Implemented in Quantum.Allocator.Heap.

Type Constraints
T :IHeapAllocationTracker 

◆ ExpandArray< T, TTracker >()

T* Quantum.Allocator.ITrackableFrameHeap.ExpandArray< T, TTracker > ( T *  buffer,
int  currentSize,
int  newSize,
TTracker  allocTracker 
)

Expands an array in the given buffer to the specified new size with an allocation tracker.

Template Parameters
TThe type of the elements in the array.
TTrackerThe type of the allocation tracker.
Parameters
bufferThe buffer containing the array.
currentSizeThe current size of the array.
newSizeThe new size of the array.
allocTrackerThe allocation tracker.
Returns
A pointer to the expanded array.

Implemented in Quantum.Allocator.Heap.

Type Constraints
T :unmanaged 
TTracker :IHeapAllocationTracker 

◆ Expand< T >()

void* Quantum.Allocator.ITrackableFrameHeap.Expand< T > ( void *  buffer,
int  currentSize,
int  newSize,
allocTracker 
)

Expands a memory block in the given buffer to the specified new size with an allocation tracker.

Template Parameters
TThe type of the allocation tracker.
Parameters
bufferThe buffer containing the memory block.
currentSizeThe current size of the memory block.
newSizeThe new size of the memory block.
allocTrackerThe allocation tracker.
Returns
A pointer to the expanded memory block.

Implemented in Quantum.Allocator.Heap.

Type Constraints
T :IHeapAllocationTracker 

◆ Free< T >() [1/2]

void Quantum.Allocator.ITrackableFrameHeap.Free< T > ( void *  ptr,
allocTracker 
)

Frees a block of memory with an allocation tracker.

Template Parameters
TThe type of the allocation tracker.
Parameters
ptrA pointer to the memory block to free.
allocTrackerThe allocation tracker.

Implemented in Quantum.Allocator.Heap.

Type Constraints
T :IHeapAllocationTracker 

◆ Free< T >() [2/2]

void Quantum.Allocator.ITrackableFrameHeap.Free< T > ( Ptr  ptr,
allocTracker 
)

Frees a Ptr for a block of memory with an allocation tracker.

Template Parameters
TThe type of the allocation tracker.
Parameters
ptrA Ptr for the memory block to free.
allocTrackerThe allocation tracker.

Implemented in Quantum.Allocator.Heap.

Type Constraints
T :IHeapAllocationTracker