#include <PI_Malloc.h>
Collaboration diagram for ACE_PI_Control_Block:

Public Types | |
| typedef ACE_Based_Pointer< ACE_Malloc_Header > | MALLOC_HEADER_PTR |
| typedef ACE_Based_Pointer< ACE_Name_Node > | NAME_NODE_PTR |
| typedef ACE_Based_Pointer_Basic< char > | CHAR_PTR |
Public Methods | |
| void | dump (void) const |
| Dump the state of the object. More... | |
Static Public Methods | |
| void | print_alignment_info (void) |
| Print out a bunch of size info for debugging. More... | |
Public Attributes | |
| int | ref_counter_ |
| Reference counter. More... | |
| NAME_NODE_PTR | name_head_ |
| Head of the linked list of Name Nodes. More... | |
| MALLOC_HEADER_PTR | freep_ |
| Current head of the freelist. More... | |
| char | lock_name_ [MAXNAMELEN] |
| Name of lock thats ensures mutual exclusion. More... | |
| long | align_ [ACE_PI_CONTROL_BLOCK_ALIGN_LONGS< 1?1:ACE_PI_CONTROL_BLOCK_ALIGN_LONGS] |
| Force alignment. More... | |
| ACE_Malloc_Header | base_ |
| Dummy node used to anchor the freelist. This needs to come last... More... | |
Private Methods | |
| void | operator= (const ACE_Control_Block &) |
This class implements the control block structure that can be used in a "position indepent" fashion, i.e., you don't need to "map" the underlying memory pool to the same address in processes sharing the memory. The tradoff of this flexibility is more expensive malloc/free operations.
Definition at line 42 of file PI_Malloc.h.
|
|
Definition at line 50 of file PI_Malloc.h. |
|
|
Definition at line 48 of file PI_Malloc.h. |
|
|
Definition at line 49 of file PI_Malloc.h. |
|
|
Dump the state of the object.
Definition at line 68 of file PI_Malloc.cpp. References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_LIB_TEXT, ACE_TRACE, base_, ACE_PI_Control_Block::ACE_Malloc_Header::dump, freep_, LM_DEBUG, name_head_, and ACE_PI_Control_Block::ACE_Malloc_Header::next_block_.
00069 {
00070 ACE_TRACE ("ACE_PI_Control_Block::dump");
00071
00072 ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00073 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("Name Node:\n")));
00074 for (ACE_Name_Node *nextn = this->name_head_;
00075 nextn != 0;
00076 nextn = nextn->next_)
00077 nextn->dump ();
00078
00079 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("freep_ = %x"), (ACE_Malloc_Header *) this->freep_));
00080 this->base_.dump ();
00081
00082 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\nMalloc Header:\n")));
00083 for (ACE_Malloc_Header *nexth = ((ACE_Malloc_Header *)this->freep_)->next_block_;
00084 nexth != 0 && nexth != &this->base_;
00085 nexth = nexth->next_block_)
00086 nexth->dump ();
00087
00088 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\n")));
00089 ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00090 }
|
|
|
|
|
|
Print out a bunch of size info for debugging.
Definition at line 34 of file PI_Malloc.cpp. References ACE_DEBUG, ACE_LIB_TEXT, ACE_MALLOC_ALIGN, ACE_MALLOC_HEADER_SIZE, ACE_MALLOC_PADDING, ACE_PI_CONTROL_BLOCK_ALIGN_LONGS, ACE_PI_CONTROL_BLOCK_SIZE, ACE_PI_MALLOC_PADDING_SIZE, ACE_TRACE, and LM_DEBUG.
00035 {
00036 ACE_TRACE ("ACE_PI_Control_Block::ACE_Control_Block::print_alignment_info");
00037 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("Start ---> ACE_PI_Control_Block::print_alignment_info:\n")));
00038 ACE_DEBUG ((LM_DEBUG,
00039 ACE_LIB_TEXT ("Sizeof ptr: %d\n")
00040 ACE_LIB_TEXT ("Sizeof size_t: %d\n")
00041 ACE_LIB_TEXT ("Sizeof long: %d\n")
00042 ACE_LIB_TEXT ("Sizeof double: %d\n")
00043 ACE_LIB_TEXT ("Sizeof ACE_MALLOC_ALIGN: %d\n")
00044 ACE_LIB_TEXT ("sizeof ACE_MALLOC_PADDING: %d\n")
00045 ACE_LIB_TEXT ("Sizeof ACE_MALLOC_HEADER_SIZE: %d\n")
00046 ACE_LIB_TEXT ("Sizeof ACE_PI_MALLOC_PADDING_SIZE: %d\n")
00047 ACE_LIB_TEXT ("Sizeof ACE_PI_CONTROL_BLOCK_SIZE: %d\n")
00048 ACE_LIB_TEXT ("Sizeof ACE_PI_CONTROL_BLOCK_ALIGN_LONGS: %d\n")
00049 ACE_LIB_TEXT ("Sizeof (MALLOC_HEADER): %d\n")
00050 ACE_LIB_TEXT ("Sizeof (CONTROL_BLOCK): %d\n"),
00051 sizeof (char *),
00052 sizeof (size_t),
00053 sizeof (long),
00054 sizeof (double),
00055 ACE_MALLOC_ALIGN,
00056 ACE_MALLOC_PADDING,
00057 ACE_MALLOC_HEADER_SIZE,
00058 ACE_PI_MALLOC_PADDING_SIZE,
00059 ACE_PI_CONTROL_BLOCK_SIZE,
00060 ACE_PI_CONTROL_BLOCK_ALIGN_LONGS,
00061 sizeof (ACE_Malloc_Header),
00062 sizeof (ACE_PI_Control_Block)
00063 ));
00064 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("End <--- ACE_PI_Control_Block::print_alignment_info:\n")));
00065 }
|
|
|
Force alignment.
Definition at line 194 of file PI_Malloc.h. |
|
|
Dummy node used to anchor the freelist. This needs to come last...
Definition at line 198 of file PI_Malloc.h. Referenced by dump. |
|
|
Current head of the freelist.
Definition at line 162 of file PI_Malloc.h. Referenced by dump. |
|
|
Name of lock thats ensures mutual exclusion.
Definition at line 165 of file PI_Malloc.h. |
|
|
Head of the linked list of Name Nodes.
Definition at line 159 of file PI_Malloc.h. Referenced by dump. |
|
|
Reference counter.
Definition at line 156 of file PI_Malloc.h. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002