Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

nvutil::Chunk Class Reference

Chunk of memory for our low level memory managment of fixed size objects. More...

#include <Allocator.h>

List of all members.

Public Methods

 Chunk (size_t blockSize)
 construct a chunk of blockSize bytes. More...

bool operator== (const Chunk &rhs) const
 provide comparison of chunks. More...

bool operator!= (const Chunk &rhs) const
void * alloc ()
 memory management interface. More...

void dealloc (void *p)
void freeMemory ()
 explicitely free memory. More...

unsigned char blocksAvailable () const
 provide number of blocks available in this chunk. More...

bool isUnused () const
 for cleanup purposes, provide check if chunk is entirely unused. More...

bool isInsideBounds (void *p) const
 provide address checking. More...


Detailed Description

Chunk of memory for our low level memory managment of fixed size objects.


Constructor & Destructor Documentation

nvutil::Chunk::Chunk size_t    blockSize
 

construct a chunk of blockSize bytes.


Member Function Documentation

bool nvutil::Chunk::operator== const Chunk &    rhs const [inline]
 

provide comparison of chunks.

Chunk::operator==()

returns true if rhs equals this chunk

bool nvutil::Chunk::operator!= const Chunk &    rhs const [inline]
 

Chunk::operator!=()

returns true if rhs not equals this chunk

void * nvutil::Chunk::alloc   [inline]
 

memory management interface.

Chunk::alloc()

get one block from chunk; returns NULL if no blocks available

void nvutil::Chunk::dealloc void *    p [inline]
 

Chunk::dealloc()

deallocate a block pointed to by p

void nvutil::Chunk::freeMemory   [inline]
 

explicitely free memory.

Chunk::freeMemory()

explicitely free chunk's raw memory

unsigned char nvutil::Chunk::blocksAvailable   const [inline]
 

provide number of blocks available in this chunk.

Chunk::blocksAvailable()

provides number of blocks available in this chunk

bool nvutil::Chunk::isUnused   const [inline]
 

for cleanup purposes, provide check if chunk is entirely unused.

Chunk::isUnused()

for cleanup purposes, provide check if chunk is entirely unused

bool nvutil::Chunk::isInsideBounds void *    p const [inline]
 

provide address checking.

Chunk::isInsideBounds()

returns true if the address given belongs to this chunk; false otherwise


The documentation for this class was generated from the following file:
Generated on Tue Mar 1 13:20:44 2005 for NVSGSDK by NVIDIA