Panda3D
|
A single block as returned from SimpleAllocator::alloc(). More...
#include "simpleAllocator.h"
Public Member Functions | |
~SimpleAllocatorBlock () | |
The block automatically frees itself when it destructs. More... | |
void | free () |
Releases the allocated space. More... | |
SimpleAllocator * | get_allocator () const |
Returns the SimpleAllocator object that owns this block. More... | |
size_t | get_max_size () const |
Returns the maximum size this block can be reallocated to, as limited by the following block. More... | |
SimpleAllocatorBlock * | get_next_block () const |
Returns a pointer to the next allocated block in the chain, or NULL if there are no more allocated blocks. More... | |
size_t | get_size () const |
Returns the size of this block. More... | |
size_t | get_start () const |
Returns the starting point of this block. More... | |
bool | is_free () const |
Returns true if the block has been freed, false if it is still valid. More... | |
void | output (ostream &out) const |
bool | realloc (size_t size) |
Changes the size of this block to the specified size. More... | |
Friends | |
class | SimpleAllocator |
A single block as returned from SimpleAllocator::alloc().
Definition at line 95 of file simpleAllocator.h.
|
inline |
The block automatically frees itself when it destructs.
Definition at line 185 of file simpleAllocator.I.
References free().
Referenced by SimpleAllocator::get_first_block().
|
inline |
Releases the allocated space.
Definition at line 195 of file simpleAllocator.I.
References get_allocator().
Referenced by ~SimpleAllocatorBlock().
|
inline |
Returns the SimpleAllocator object that owns this block.
Returns NULL if the block has been freed.
Definition at line 209 of file simpleAllocator.I.
References get_start().
Referenced by free(), and VertexDataBlock::get_page().
|
inline |
Returns the maximum size this block can be reallocated to, as limited by the following block.
Definition at line 255 of file simpleAllocator.I.
References realloc().
Referenced by is_free().
|
inline |
Returns a pointer to the next allocated block in the chain, or NULL if there are no more allocated blocks.
Definition at line 282 of file simpleAllocator.I.
Referenced by VertexDataBlock::get_next_block(), and realloc().
|
inline |
Returns the size of this block.
It is an error to call this if the block has been freed.
Definition at line 232 of file simpleAllocator.I.
References is_free().
Referenced by get_start(), and VertexDataSaveFile::read_data().
|
inline |
Returns the starting point of this block.
It is an error to call this if the block has been freed.
Definition at line 220 of file simpleAllocator.I.
References get_size().
Referenced by get_allocator(), VertexDataBlock::get_pointer(), and VertexDataSaveFile::read_data().
|
inline |
Returns true if the block has been freed, false if it is still valid.
Definition at line 244 of file simpleAllocator.I.
References get_max_size().
Referenced by get_size().
|
inline |
Changes the size of this block to the specified size.
Returns true if the change is accepted, false if there was not enough room.
Definition at line 269 of file simpleAllocator.I.
References get_next_block().
Referenced by get_max_size().