Shadowrun: Awakened 29 September 2011 - Build 871
Classes | Public Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
cat::RegionAllocator Class Reference

#include <RegionAllocator.hpp>

Inheritance diagram for cat::RegionAllocator:

List of all members.

Classes

struct  RegionInfo
struct  RegionInfoHead

Public Member Functions

void * Acquire (u32 bytes)
template<class T >
TAcquireBuffer (u32 extra_bytes=0)
template<class T >
CAT_INLINE void Delete (T *ptr)
void Release (void *ptr)
void * Resize (void *ptr, u32 bytes)
void Shutdown ()
bool Valid ()

Protected Attributes

u32 bitmap_dwords [REGION_COUNT]
u32 blocks_per_region [REGION_COUNT]
u32 bytes_overall
RegionInforegion_info [REGION_COUNT]
u8regions [REGION_COUNT]

Static Protected Attributes

static const u32 BLOCK_SIZE [REGION_COUNT]
static const u32 REGION_COUNT = 6

Private Member Functions

 CAT_SINGLETON (RegionAllocator)

Detailed Description

Definition at line 43 of file RegionAllocator.hpp.


Member Function Documentation

void* cat::RegionAllocator::Acquire ( u32  bytes)
template<class T >
T* cat::RegionAllocator::AcquireBuffer ( u32  extra_bytes = 0) [inline]

Definition at line 91 of file RegionAllocator.hpp.

References Acquire(), and T.

    {
        return reinterpret_cast<T*>( Acquire(sizeof(T) + extra_bytes) );
    }
cat::RegionAllocator::CAT_SINGLETON ( RegionAllocator  ) [private]
template<class T >
CAT_INLINE void cat::RegionAllocator::Delete ( T ptr) [inline]

Definition at line 81 of file RegionAllocator.hpp.

References Release().

Referenced by cat::FIFO::Queue< T >::Dequeue(), and cat::FIFO::Queue< T >::~Queue().

    {
        ptr->~T();
        Release(ptr);
    }
void cat::RegionAllocator::Release ( void *  ptr)
void* cat::RegionAllocator::Resize ( void *  ptr,
u32  bytes 
)
void cat::RegionAllocator::Shutdown ( )
bool cat::RegionAllocator::Valid ( )

Member Data Documentation

Definition at line 64 of file RegionAllocator.hpp.

Definition at line 60 of file RegionAllocator.hpp.

Definition at line 63 of file RegionAllocator.hpp.

Definition at line 62 of file RegionAllocator.hpp.

const u32 cat::RegionAllocator::REGION_COUNT = 6 [static, protected]

Definition at line 59 of file RegionAllocator.hpp.

Definition at line 66 of file RegionAllocator.hpp.

Definition at line 65 of file RegionAllocator.hpp.


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

Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net