Kaim::SysAlloc Class Reference

Kaim::SysAlloc Class Referenceabstract

#include <kernel.h>

Class Description

The SysAlloc class specifies an interface for allocating and freeing memory.

The BaseSystem maintains an instance of a class that implements the SysAlloc interface, which it makes available to all other Autodesk Navigation components. You can customize Autodesk Navigation memory management by writing your own implementation of the SysAlloc interface, and setting up the BaseSystem to use an instance of your custom class.

+ Examples:

Inherits Kaim::SysAllocBase.

Inherited by Kaim::MagicSysAlloc, and Kaim::SysAllocBase_SingletonSupport< SysAllocMalloc, SysAlloc >.

Public Member Functions

virtual void * Alloc (UPInt size, UPInt align)=0
 Allocates a buffer of the specified size, with the specified alignment. More...
 
virtual void Free (void *ptr, UPInt size, UPInt align)=0
 Frees the specified memory buffer. More...
 
virtual void * Realloc (void *oldPtr, UPInt oldSize, UPInt newSize, UPInt align)=0
 Re-allocates a buffer to a new size. More...
 

Member Function Documentation

void * Kaim::SysAlloc::Alloc ( UPInt  size,
UPInt  align 
)
pure virtual

Allocates a buffer of the specified size, with the specified alignment.

Parameters
sizeThe size of the requested buffer.
alignThe alignment requested for the buffer.

Implemented in Kaim::SysAllocMalloc.

+ Examples:
void Kaim::SysAlloc::Free ( void *  ptr,
UPInt  size,
UPInt  align 
)
pure virtual

Frees the specified memory buffer.

Parameters
ptrThe address of the buffer to be freed.
sizeThe size of the buffer to be freed.
alignThe alignment of the buffer.

Implemented in Kaim::SysAllocMalloc.

+ Examples:
void * Kaim::SysAlloc::Realloc ( void *  oldPtr,
UPInt  oldSize,
UPInt  newSize,
UPInt  align 
)
pure virtual

Re-allocates a buffer to a new size.

Parameters
oldPtrThe current location of the buffer.
oldSizeThe current size of the buffer.
newSizeThe new desired size for the buffer.
alignThe alignment requested for the new buffer.

Implemented in Kaim::SysAllocMalloc.

+ Examples:

The documentation for this class was generated from the following files:
  • gwnavruntime/kernel/SF_SysAlloc.h
  • gwnavruntime/kernel/HeapMH/HeapMH_MemoryHeap.cpp
  • doc/source/cpp-reference/kernel.h