diff options
Diffstat (limited to 'ace/Malloc.h')
-rw-r--r-- | ace/Malloc.h | 48 |
1 files changed, 6 insertions, 42 deletions
diff --git a/ace/Malloc.h b/ace/Malloc.h index 7844a8079a3..4c78cd702f3 100644 --- a/ace/Malloc.h +++ b/ace/Malloc.h @@ -84,12 +84,11 @@ class ACE_Export ACE_Malloc_Header // This is the control block header. It's used by <ACE_Malloc> // to keep track of each chunk of data when it's in the free // list or in use. + public: #if defined (ACE_HAS_POSITION_INDEPENDENT_MALLOC) -# define ACE_POINTER_CAST(PTR) ((PTR).addr ()) typedef ACE_Based_Pointer<ACE_Malloc_Header> HEADER_PTR; #else -# define ACE_POINTER_CAST(PTR) ((PTR)) typedef ACE_Malloc_Header *HEADER_PTR; #endif /* ACE_HAS_POSITION_INDEPENDENT_MALLOC */ @@ -113,52 +112,22 @@ public: class ACE_Export ACE_Name_Node { // = TITLE - // This class supports "named memory regions" within <ACE_Malloc>. - // - // = DESCRIPTION - // Internally, the named memory regions are stored as a linked - // list within the <Memory_Pool>. + // This is stored as a linked list within the Memory_Pool + // to allow "named memory chunks." public: // = Initialization methods. - ACE_Name_Node (const char *name, - char *, - ACE_Name_Node *); - // Constructor. - - ACE_Name_Node (const ACE_Name_Node &); - // Copy constructor. - + ACE_Name_Node (const char *name, void *, ACE_Name_Node *); ACE_Name_Node (void); - // Constructor. - ~ACE_Name_Node (void); - // Constructor. - - const char *name (void) const; - // Return a pointer to the name of this node. - - void name (const char *); - // Assign a name; - -#if defined (ACE_HAS_POSITION_INDEPENDENT_MALLOC) - ACE_Based_Pointer_Basic<char> name_; - // Name of the Node. - - ACE_Based_Pointer_Basic<char> pointer_; - // Pointer to the contents. - ACE_Based_Pointer<ACE_Name_Node> next_; - // Pointer to the next node in the chain. -#else char *name_; // Name of the Node. - char *pointer_; + void *pointer_; // Pointer to the contents. ACE_Name_Node *next_; // Pointer to the next node in the chain. -#endif /* ACE_HAS_POSITION_INDEPENDENT_MALLOC */ void dump (void) const; // Dump the state of the object. @@ -167,19 +136,14 @@ public: class ACE_Export ACE_Control_Block { // = TITLE - // This information is stored in memory allocated by the <Memory_Pool>. + // This information is stored in memory allocated by the MEMORY_POOL. // // = DESCRIPTION // This class should be local to class ACE_Malloc, but some older // C++ compilers don't like nested classes in templates... public: -#if defined (ACE_HAS_POSITION_INDEPENDENT_MALLOC) - ACE_Based_Pointer<ACE_Name_Node> name_head_; - // Head of the linked list of Name Nodes. -#else ACE_Name_Node *name_head_; // Head of the linked list of Name Nodes. -#endif /* ACE_HAS_POSITION_INDEPENDENT_MALLOC */ ACE_Malloc_Header::HEADER_PTR freep_; // Current head of the freelist. |