CrystalSpace

Public API Reference

CS::Memory::AllocatorAlign< A > Class Template Reference

This class implements an allocator policy which aligns the first element on given byte boundary. More...

#include <csutil/allocator.h>

List of all members.

Public Member Functions

void * Realloc (void *p, size_t newSize)
void SetMemTrackerInfo (const char *info)

Static Public Member Functions

static void * Alloc (size_t size)
 Allocate a raw block of given size.
static void Free (void *p)
 Free a block.


Detailed Description

template<size_t A = 1>
class CS::Memory::AllocatorAlign< A >

This class implements an allocator policy which aligns the first element on given byte boundary.

It has a per-block overhead of `sizeof(void*)+alignment' bytes.

Definition at line 200 of file allocator.h.


Member Function Documentation

template<size_t A = 1>
static void* CS::Memory::AllocatorAlign< A >::Alloc ( size_t  size  )  [inline, static]

Allocate a raw block of given size.

Definition at line 206 of file allocator.h.

References CS::Memory::AlignedMalloc().

template<size_t A = 1>
static void CS::Memory::AllocatorAlign< A >::Free ( void *  p  )  [inline, static]

Free a block.

Remarks:
Does not check that the block pointer is valid.

Definition at line 215 of file allocator.h.

References CS::Memory::AlignedFree().


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.4.7