Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions

# SimpleAllocatorBlock Class Reference

A single block as returned from SimpleAllocator.alloc(). More...

Inheritance diagram for SimpleAllocatorBlock:

List of all members.

## Public Member Functions
| free ()
| Releases the allocated space.
SimpleAllocator | getAllocator ()
| Returns the SimpleAllocator object that owns this block.
unsigned int | getMaxSize ()
| Returns the maximum size this block can be reallocated to, as limited by the following block.
SimpleAllocatorBlock | getNextBlock ()
| Returns a pointer to the next allocated block in the chain, or NULL if there are no more allocated blocks.
unsigned int | getSize ()
| Returns the size of this block.
unsigned int | getStart ()
| Returns the starting point of this block.
bool | isFree ()
| Returns true if the block has been freed, false if it is still valid.
| output (ostream out)
bool | realloc (unsigned int size)
| Changes the size of this block to the specified size.

## Detailed Description

A single block as returned from SimpleAllocator.alloc().

## Member Function Documentation

free | ( |  | ) |

Releases the allocated space.

SimpleAllocator getAllocator | ( |  | ) |

Returns the SimpleAllocator object that owns this block.

Returns NULL if the block has been freed.

unsigned int getMaxSize | ( |  | ) |

Returns the maximum size this block can be reallocated to, as limited by the following block.

SimpleAllocatorBlock getNextBlock | ( |  | ) |

Returns a pointer to the next allocated block in the chain, or NULL if there are no more allocated blocks.

Reimplemented in VertexDataBlock.

unsigned int getSize | ( |  | ) |

Returns the size of this block.

It is an error to call this if the block has been freed.

unsigned int getStart | ( |  | ) |

Returns the starting point of this block.

It is an error to call this if the block has been freed.

bool isFree | ( |  | ) |

Returns true if the block has been freed, false if it is still valid.

output | ( | ostream | out | ) |

bool realloc | ( | unsigned int | size | ) |

Changes the size of this block to the specified size.

Returns true if the change is accepted, false if there was not enough room.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties