Kaim::SysAllocMalloc Class Reference

Kaim::SysAllocMalloc Class Reference

#include <kernel.h>

Class Description

This implementation of SysAlloc is used by default by the BaseSystem to allocate and free memory, if you do not set up the BaseSystem with your own custom implementation of SysAlloc.

Inherits Kaim::SysAllocBase_SingletonSupport< SysAllocMalloc, SysAlloc >.

Public Member Functions

virtual void * Alloc (UPInt size, UPInt align)
 
virtual void Free (void *ptr, UPInt size, UPInt align)
 
virtual void * Realloc (void *oldPtr, UPInt oldSize, UPInt newSize, UPInt align)
 

Member Function Documentation

virtual void* Kaim::SysAllocMalloc::Alloc ( UPInt  size,
UPInt  align 
)
inlinevirtual

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

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

Implements Kaim::SysAlloc.

virtual void Kaim::SysAllocMalloc::Free ( void *  ptr,
UPInt  size,
UPInt  align 
)
inlinevirtual

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.

Implements Kaim::SysAlloc.

virtual void* Kaim::SysAllocMalloc::Realloc ( void *  oldPtr,
UPInt  oldSize,
UPInt  newSize,
UPInt  align 
)
inlinevirtual

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.

Implements Kaim::SysAlloc.


The documentation for this class was generated from the following file: