CrystalSpace

Public API Reference

CS::Memory Namespace Reference

Memory allocation. More...

Classes

class  AllocatorAlign
 This class implements an allocator policy which aligns the first element on given byte boundary. More...
class  AllocatorHeap
 A memory allocator that allocates from a heap. More...
class  AllocatorHeapBase
 A memory allocator that allocates from a heap. More...
class  AllocatorMalloc
 A default memory allocator that allocates with cs_malloc(). More...
class  AllocatorMallocPlatform
 Memory allocator using the platform's default allocation functions (malloc, free etc. More...
class  AllocatorNew
 A default memory allocator that allocates using new T[]. More...
class  AllocatorNewChar
 A default memory allocator that allocates using new char[]. More...
struct  AllocatorPointerWrapper
 Class to store a pointer that is allocated from Allocator, to eliminate overhead from a possibly empty Allocator. More...
class  CustomAllocated
 Class that overrides operator new/operator delete/etc. More...
class  CustomAllocatedDerived
 Class that overrides operator new/operator delete/etc. More...
class  Heap
 A separate heap from which memory can be allocated. More...
struct  HeapAccessPointer
 Heap accessor for AllocatorHeapBase. More...
class  LocalBufferAllocator
 An allocator with a small local buffer. More...

Functions

void AlignedFree (void *ptr)
 Free a block of memory allocated with AlignedMalloc.
void * AlignedMalloc (size_t size, size_t align)
 Allocate a block of memory, with the start address being aligned to a multiple of align bytes.
void * AlignedRealloc (void *ptr, size_t size, size_t align)
 Reallocate a block of memory with a new size, with the start address being aligned to a multiple of align bytes.

Detailed Description

Memory allocation.


Function Documentation

void CS::Memory::AlignedFree ( void *  ptr  ) 

Free a block of memory allocated with AlignedMalloc.

void* CS::Memory::AlignedMalloc ( size_t  size,
size_t  align 
)

Allocate a block of memory, with the start address being aligned to a multiple of align bytes.

Remarks:
The returned block of memory must be freed with AlignedFree.
void* CS::Memory::AlignedRealloc ( void *  ptr,
size_t  size,
size_t  align 
)

Reallocate a block of memory with a new size, with the start address being aligned to a multiple of align bytes.

Remarks:
The returned block of memory must be freed with AlignedFree.
Warning:
The alignment must be the same as initially passed to AlignedMalloc.

Generated for Crystal Space 1.4.1 by doxygen 1.7.1