CACAO
Public Member Functions | Private Attributes
DumpMemoryArea Class Reference

Dump memory area. More...

Public Member Functions

 DumpMemoryArea (size_t size=0)
 Allocate a new dump memory area. More...
 
 ~DumpMemoryArea ()
 Release all dump memory blocks in the current dump area. More...
 
size_t get_size () const
 
size_t get_used () const
 
voidallocate (size_t size)
 
DumpMemoryBlockget_current_block () const
 
DumpMemoryBlockallocate_new_block (size_t size)
 Allocate a dump memory block for the current dump memory area. More...
 

Private Attributes

size_t _size
 Size of the current memory block. More...
 
size_t _used
 Used memory in the current memory block. More...
 
std::vector< DumpMemoryBlock * > _blocks
 List of memory blocks in this area. More...
 

Detailed Description

Dump memory area.

Definition at line 90 of file dumpmemory.hpp.

Constructor & Destructor Documentation

DumpMemoryArea::DumpMemoryArea ( size_t  size = 0)

Allocate a new dump memory area.

@ param size Required memory size.

Definition at line 113 of file dumpmemory.cpp.

DumpMemoryArea::~DumpMemoryArea ( )

Release all dump memory blocks in the current dump area.

Definition at line 126 of file dumpmemory.cpp.

Member Function Documentation

void * DumpMemoryArea::allocate ( size_t  size)
inline

Definition at line 278 of file dumpmemory.hpp.

DumpMemoryBlock * DumpMemoryArea::allocate_new_block ( size_t  size)

Allocate a dump memory block for the current dump memory area.

Parameters
sizeRequired memory size.
Returns
Pointer to the newly allocated block.

Definition at line 167 of file dumpmemory.cpp.

DumpMemoryBlock * DumpMemoryArea::get_current_block ( ) const
inline

Definition at line 273 of file dumpmemory.hpp.

size_t DumpMemoryArea::get_size ( ) const
inline

Definition at line 103 of file dumpmemory.hpp.

size_t DumpMemoryArea::get_used ( ) const
inline

Definition at line 104 of file dumpmemory.hpp.

Field Documentation

std::vector<DumpMemoryBlock*> DumpMemoryArea::_blocks
private

List of memory blocks in this area.

Definition at line 94 of file dumpmemory.hpp.

size_t DumpMemoryArea::_size
private

Size of the current memory block.

Definition at line 92 of file dumpmemory.hpp.

size_t DumpMemoryArea::_used
private

Used memory in the current memory block.

Definition at line 93 of file dumpmemory.hpp.


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