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

byte_backet< N, M > Class Template Reference

paged backet of chunks More...

#include <byterep.h>

List of all members.

Public Member Functions

 byte_backet ()
 constructor
 ~byte_backet ()
 destructor
char * allocate ()
 allocates chunk
void deallocate (char *ptr)
 deallocates (mark for reusing) chunk
void reset ()
 ready to reuse memory
void release ()
 releases back to OS unused memory

Private Attributes

byte_allocator _all
 internal allocator
byte_tank< N > * _pages [M]
 array of pages
ub4_t _page
 page counter


Detailed Description

template<unsigned char N, ub4_t M>
class byte_backet< N, M >

paged backet of chunks

Definition at line 91 of file byterep.h.


Constructor & Destructor Documentation

template<unsigned char N, ub4_t M>
byte_backet< N, M >::byte_backet (  )  [inline]

constructor

Definition at line 184 of file byterep.hpp.

References byte_backet< N, M >::reset().

template<unsigned char N, ub4_t M>
byte_backet< N, M >::~byte_backet (  )  [inline]

destructor

Definition at line 190 of file byterep.hpp.


Member Function Documentation

template<unsigned char N, ub4_t M>
char * byte_backet< N, M >::allocate (  )  [inline]

template<unsigned char N, ub4_t M>
void byte_backet< N, M >::deallocate ( char *  ptr  )  [inline]

deallocates (mark for reusing) chunk

Parameters:
ptr  pointer to chunk

Definition at line 228 of file byterep.hpp.

References byte_backet< N, M >::_page, and byte_backet< N, M >::_pages.

Referenced by byte_repository::deallocate().

template<unsigned char N, ub4_t M>
void byte_backet< N, M >::reset (  )  [inline]

template<unsigned char N, ub4_t M>
void byte_backet< N, M >::release (  )  [inline]

releases back to OS unused memory

Definition at line 265 of file byterep.hpp.

References byte_backet< N, M >::_pages, and byte_backet< N, M >::reset().


Member Data Documentation

template<unsigned char N, ub4_t M>
byte_allocator byte_backet< N, M >::_all [private]

internal allocator

Definition at line 117 of file byterep.h.

Referenced by byte_backet< N, M >::allocate(), and byte_backet< N, M >::reset().

template<unsigned char N, ub4_t M>
byte_tank< N >* byte_backet< N, M >::_pages[M] [private]

template<unsigned char N, ub4_t M>
ub4_t byte_backet< N, M >::_page [private]


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


© Copyright Terimber 2003-.