OGRE  1.7
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ogre::NedPoolingAlignedPolicy< Alignment > Class Template Reference

An allocation policy for use with AllocatedObject and STLAllocator, which aligns memory at a given boundary (which should be a power of 2). More...

#include <OgreMemoryNedPooling.h>

Public Types

typedef int IsValidAlignment [Alignment<=128 &&((Alignment &(Alignment-1))==0)?+1:-1]
 

Static Public Member Functions

static void * allocateBytes (size_t count, const char *file=0, int line=0, const char *func=0)
 
static void deallocateBytes (void *ptr)
 
static size_t getMaxAllocationSize ()
 Get the maximum size of a single allocation. More...
 

Private Member Functions

 NedPoolingAlignedPolicy ()
 

Detailed Description

template<size_t Alignment = 0>
class Ogre::NedPoolingAlignedPolicy< Alignment >

An allocation policy for use with AllocatedObject and STLAllocator, which aligns memory at a given boundary (which should be a power of 2).

This is the class that actually does the allocation and deallocation of physical memory, and is what you will want to provide a custom version of if you wish to change how memory is allocated.

This allocation policy uses nedmalloc (http://nedprod.com/programs/portable/nedmalloc/index.html).
Note
template parameter Alignment equal to zero means use default platform dependent alignment.

Definition at line 103 of file OgreMemoryNedPooling.h.

Member Typedef Documentation

template<size_t Alignment = 0>
typedef int Ogre::NedPoolingAlignedPolicy< Alignment >::IsValidAlignment[Alignment<=128 &&((Alignment &(Alignment-1))==0)?+1:-1]

Definition at line 108 of file OgreMemoryNedPooling.h.

Constructor & Destructor Documentation

template<size_t Alignment = 0>
Ogre::NedPoolingAlignedPolicy< Alignment >::NedPoolingAlignedPolicy ( )
inlineprivate

Definition at line 128 of file OgreMemoryNedPooling.h.

Member Function Documentation

template<size_t Alignment = 0>
static void* Ogre::NedPoolingAlignedPolicy< Alignment >::allocateBytes ( size_t  count,
const char *  file = 0,
int  line = 0,
const char *  func = 0 
)
inlinestatic

Definition at line 110 of file OgreMemoryNedPooling.h.

template<size_t Alignment = 0>
static void Ogre::NedPoolingAlignedPolicy< Alignment >::deallocateBytes ( void *  ptr)
inlinestatic

Definition at line 116 of file OgreMemoryNedPooling.h.

template<size_t Alignment = 0>
static size_t Ogre::NedPoolingAlignedPolicy< Alignment >::getMaxAllocationSize ( )
inlinestatic

Get the maximum size of a single allocation.

Definition at line 122 of file OgreMemoryNedPooling.h.


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