CrystalSpace

Public API Reference

CS::Memory::AllocatorNewChar< Reallocatable > Class Template Reference

A default memory allocator that allocates using new char[]. More...

#include <csutil/allocator.h>

List of all members.

Public Member Functions

void * Alloc (const size_t n)
 Allocate a block of memory of size n.
void Free (void *p)
 Free the block p.
void * Realloc (void *p, size_t newSize)
 Resize the allocated block p to size newSize.
void SetMemTrackerInfo (const char *info)
 Set the information used for memory tracking.

Detailed Description

template<bool Reallocatable = true>
class CS::Memory::AllocatorNewChar< Reallocatable >

A default memory allocator that allocates using new char[].

Reallocatable specifies whether Realloc() should be supported. (This support incurs an overhead as the allocated size has to be stored.)

Definition at line 348 of file allocator.h.


Member Function Documentation

template<bool Reallocatable = true>
void* CS::Memory::AllocatorNewChar< Reallocatable >::Alloc ( const size_t  n  )  [inline]

Allocate a block of memory of size n.

Definition at line 359 of file allocator.h.

template<bool Reallocatable = true>
void CS::Memory::AllocatorNewChar< Reallocatable >::Free ( void *  p  )  [inline]

Free the block p.

Definition at line 378 of file allocator.h.

template<bool Reallocatable = true>
void* CS::Memory::AllocatorNewChar< Reallocatable >::Realloc ( void *  p,
size_t  newSize 
) [inline]

Resize the allocated block p to size newSize.

Definition at line 393 of file allocator.h.

template<bool Reallocatable = true>
void CS::Memory::AllocatorNewChar< Reallocatable >::SetMemTrackerInfo ( const char *  info  )  [inline]

Set the information used for memory tracking.

Definition at line 413 of file allocator.h.


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

Generated for Crystal Space 1.4.1 by doxygen 1.7.1