#include <Malloc.h>
Collaboration diagram for ACE_Control_Block:
Public Member Functions | |
void | dump (void) const |
Dump the state of the object. | |
Static Public Member Functions | |
void | print_alignment_info (void) |
Print out a bunch of size info for debugging. | |
Public Attributes | |
int | ref_counter_ |
Reference counter. | |
ACE_Name_Node * | name_head_ |
Head of the linked list of Name Nodes. | |
ACE_Malloc_Header * | freep_ |
Current head of the freelist. | |
char | lock_name_ [MAXNAMELEN] |
Name of lock thats ensures mutual exclusion. | |
char | align_ [(ACE_CONTROL_BLOCK_ALIGN_BYTES)?ACE_CONTROL_BLOCK_ALIGN_BYTES:ACE_MALLOC_ALIGN] |
ACE_Malloc_Header | base_ |
Dummy node used to anchor the freelist. This needs to come last... |
This class defines the "old" control block class for use in ACE_Malloc_T. This control block implementation is considerable more efficient than the "position independent" one below (ACE_PI_Control_Block) but if you are going to use it to construct a ACE_Malloc_T and access the memory from several different processes, you must "map" the underlying memory pool to the same address.
Definition at line 256 of file Malloc.h.
|
Dump the state of the object.
Definition at line 79 of file Malloc.cpp. References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_LIB_TEXT, ACE_TRACE, base_, ACE_Control_Block::ACE_Malloc_Header::dump(), ACE_Control_Block::ACE_Name_Node::dump(), freep_, LM_DEBUG, name_head_, ACE_Control_Block::ACE_Name_Node::next_, and ACE_Control_Block::ACE_Malloc_Header::next_block_.
00080 { 00081 #if defined (ACE_HAS_DUMP) 00082 ACE_TRACE ("ACE_Control_Block::dump"); 00083 00084 ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); 00085 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("Name Node:\n"))); 00086 for (ACE_Name_Node *nextn = this->name_head_; 00087 nextn != 0; 00088 nextn = nextn->next_) 00089 nextn->dump (); 00090 00091 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("freep_ = %@"), (ACE_Malloc_Header *) this->freep_)); 00092 this->base_.dump (); 00093 00094 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\nMalloc Header:\n"))); 00095 for (ACE_Malloc_Header *nexth = ((ACE_Malloc_Header *)this->freep_)->next_block_; 00096 nexth != 0 && nexth != &this->base_; 00097 nexth = nexth->next_block_) 00098 nexth->dump (); 00099 00100 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\n"))); 00101 ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); 00102 #endif /* ACE_HAS_DUMP */ 00103 } |
|
Print out a bunch of size info for debugging.
Definition at line 43 of file Malloc.cpp. References ACE_CONTROL_BLOCK_ALIGN_BYTES, ACE_CONTROL_BLOCK_SIZE, ACE_DEBUG, ACE_LIB_TEXT, ACE_MALLOC_ALIGN, ACE_MALLOC_HEADER_SIZE, ACE_MALLOC_PADDING, ACE_MALLOC_PADDING_SIZE, ACE_TRACE, and LM_DEBUG.
00044 { 00045 #if defined (ACE_HAS_DUMP) 00046 ACE_TRACE ("ACE_Control_Block::print_alignment_info"); 00047 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("Start ---> ACE_Control_Block::print_alignment_info:\n"))); 00048 ACE_DEBUG ((LM_DEBUG, 00049 ACE_LIB_TEXT ("Sizeof ptr: %d\n") 00050 ACE_LIB_TEXT ("Sizeof size_t: %d\n") 00051 ACE_LIB_TEXT ("Sizeof long: %d\n") 00052 ACE_LIB_TEXT ("Sizeof double: %d\n") 00053 ACE_LIB_TEXT ("Sizeof ACE_MALLOC_ALIGN: %d\n") 00054 ACE_LIB_TEXT ("Sizeof ACE_MALLOC_PADDING: %d\n") 00055 ACE_LIB_TEXT ("Sizeof ACE_MALLOC_HEADER_SIZE: %d\n") 00056 ACE_LIB_TEXT ("Sizeof ACE_MALLOC_PADDING_SIZE: %d\n") 00057 ACE_LIB_TEXT ("Sizeof ACE_CONTROL_BLOCK_SIZE: %d\n") 00058 ACE_LIB_TEXT ("Sizeof ACE_CONTROL_BLOCK_ALIGN_BYTES: %d\n") 00059 ACE_LIB_TEXT ("Sizeof (MALLOC_HEADER): %d\n") 00060 ACE_LIB_TEXT ("Sizeof (CONTROL_BLOCK): %d\n"), 00061 sizeof (char *), 00062 sizeof (size_t), 00063 sizeof (long), 00064 sizeof (double), 00065 ACE_MALLOC_ALIGN, 00066 ACE_MALLOC_PADDING, 00067 ACE_MALLOC_HEADER_SIZE, 00068 ACE_MALLOC_PADDING_SIZE, 00069 ACE_CONTROL_BLOCK_SIZE, 00070 ACE_CONTROL_BLOCK_ALIGN_BYTES, 00071 sizeof (ACE_Malloc_Header), 00072 sizeof (ACE_Control_Block) 00073 )); 00074 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("End <--- ACE_Control_Block::print_alignment_info:\n"))); 00075 #endif /* ACE_HAS_DUMP */ 00076 } |
|
|
|
Dummy node used to anchor the freelist. This needs to come last...
Definition at line 382 of file Malloc.h. Referenced by dump(). |
|
Current head of the freelist.
Definition at line 355 of file Malloc.h. Referenced by dump(). |
|
Name of lock thats ensures mutual exclusion.
|
|
Head of the linked list of Name Nodes.
Definition at line 352 of file Malloc.h. Referenced by dump(). |
|
Reference counter.
|