Home / Open source / Terimber 2.0
byte_repository Class Referencebyte repository class for allocation memory by fixed chunks
More...
#include <byterep.h>
List of all members.
|
Public Member Functions |
char * | allocate (size_t len) |
| allocates len bytes
|
void | deallocate (char *ptr) |
| deallocates (reuse) memory
|
void | reset () |
| release memory back to OS
|
Private Member Functions |
| byte_repository () |
| constructor
|
Private Attributes |
byte_backet< 4, 64 *1024 > | _backet4 |
| page = (16 + 4)*64*64K ~ 64M
|
byte_backet< 5, 32 *1024 > | _backet5 |
| page = (32 + 4)*64*32K ~ 64M
|
byte_backet< 6, 16 *1024 > | _backet6 |
| page = (64 + 4)*64*16K ~ 64M
|
byte_backet< 7, 8 *1024 > | _backet7 |
| page = (128 + 4)*64*8K ~ 64M
|
byte_backet< 8, 4 *1024 > | _backet8 |
| page = (256 + 4)*64*4K ~ 64M
|
byte_backet< 9, 2 *1024 > | _backet9 |
| page = (512 + 4)*64*2K ~ 64M
|
byte_backet< 10, 1 *1024 > | _backet10 |
| page = (1024 + 4)*64*1K ~ 64M
|
byte_backet< 11, 512 > | _backet11 |
| page = (2048 + 4)*64*512 ~ 64M
|
byte_backet< 12, 256 > | _backet12 |
| page = (4096 + 4)*64*256 ~ 64M
|
byte_backet< 13, 128 > | _backet13 |
| page = (8192 + 4)*64*128 ~ 64M
|
Friends |
class | byte_repository_factory |
| class must be created dynamically due to the size
|
Detailed Description
byte repository class for allocation memory by fixed chunks
Definition at line 125 of file byterep.h.
Constructor & Destructor Documentation
byte_repository::byte_repository |
( |
|
) |
[inline, private] |
Member Function Documentation
char * byte_repository::allocate |
( |
size_t |
len |
) |
[inline] |
allocates len bytes
- Parameters:
-
Definition at line 277 of file byterep.hpp.
References _backet10, _backet11, _backet12, _backet13, _backet4, _backet5, _backet6, _backet7, _backet8, _backet9, and byte_backet< N, M >::allocate().
void byte_repository::deallocate |
( |
char * |
ptr |
) |
[inline] |
deallocates (reuse) memory
- Parameters:
-
Definition at line 338 of file byterep.hpp.
References _backet10, _backet11, _backet12, _backet13, _backet4, _backet5, _backet6, _backet7, _backet8, _backet9, and byte_backet< N, M >::deallocate().
void byte_repository::reset |
( |
|
) |
[inline] |
release memory back to OS
Definition at line 384 of file byterep.hpp.
References _backet10, _backet11, _backet12, _backet13, _backet4, _backet5, _backet6, _backet7, _backet8, _backet9, and byte_backet< N, M >::reset().
Friends And Related Function Documentation
class must be created dynamically due to the size
Definition at line 128 of file byterep.h.
Member Data Documentation
The documentation for this class was generated from the following files:
|
|