#include <Malloc_T.h>
Inheritance diagram for ACE_Cached_Mem_Pool_Node:


Public Methods | |
| T * | addr (void) |
| Return the address of free memory. More... | |
| ACE_Cached_Mem_Pool_Node< T > * | get_next (void) |
| Get the next ACE_Cached_Mem_Pool_Node in a list. More... | |
| void | set_next (ACE_Cached_Mem_Pool_Node< T > *ptr) |
| Set the next ACE_Cached_Mem_Pool_Node. More... | |
Private Attributes | |
| ACE_Cached_Mem_Pool_Node< T > * | next_ |
| Since memory is not used when placed in a free list, we can use it to maintain the structure of free list. More... | |
The length of a piece of unused memory must be greater than sizeof (void*). This makes sense because we'll waste even more memory if we keep them in a separate data structure. This class should really be placed within the next class <ACE_Cached_Allocator>. But this can't be done due to C++ compiler portability problems.
|
||||||||||
|
Return the address of free memory.
|
|
||||||||||
|
Get the next ACE_Cached_Mem_Pool_Node in a list.
|
|
||||||||||
|
Set the next ACE_Cached_Mem_Pool_Node.
|
|
|||||
|
Since memory is not used when placed in a free list, we can use it to maintain the structure of free list. I was using union to hide the fact of overlapping memory usage. However, that cause problem on MSVC. So, I now turn back to hack this with casting. |
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001