Thread portable class


Gate portable class


Timer class


Pool class


Terimber 2.0


About C++


Downloads Products & Services Support Clients Open Source About



Home / Open source / Terimber 2.0

chunk_stack Class Reference

keeps free chunks of memory for reusing More...

#include <memory.h>

List of all members.

Public Member Functions

 chunk_stack ()
 constructor
void clear ()
 clears stack
void push (size_t *chunk)
 pushes new chunk
size_t * pop ()
 removes the head chunk
size_t * top ()
 returns the head chunk
bool empty ()
 returns the head chunk

Private Attributes

size_t * _head
 pointer to the head chunk


Detailed Description

keeps free chunks of memory for reusing

Definition at line 124 of file memory.h.


Constructor & Destructor Documentation

BEGIN_TERIMBER_NAMESPACE chunk_stack::chunk_stack (  )  [inline]

constructor

Definition at line 39 of file memory.hpp.


Member Function Documentation

void chunk_stack::clear (  )  [inline]

void chunk_stack::push ( size_t *  chunk  )  [inline]

pushes new chunk

Parameters:
chunk  pointer to new chunk

Definition at line 54 of file memory.hpp.

References _head.

Referenced by rep_allocator::deallocate().

size_t * chunk_stack::pop (  )  [inline]

removes the head chunk

Definition at line 65 of file memory.hpp.

References _head.

Referenced by node_allocator< T >::allocate(), and array_allocator< T >::pop().

size_t * chunk_stack::top (  )  [inline]

returns the head chunk

Definition at line 76 of file memory.hpp.

References _head.

Referenced by array_allocator< T >::pop().

bool chunk_stack::empty (  )  [inline]

returns the head chunk

Definition at line 84 of file memory.hpp.

References _head.

Referenced by node_allocator< T >::allocate().


Member Data Documentation

size_t* chunk_stack::_head [private]

pointer to the head chunk

Definition at line 153 of file memory.h.

Referenced by clear(), empty(), pop(), push(), and top().


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


© Copyright Terimber 2003-.