summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ace/Free_List.cpp2
-rw-r--r--ace/Malloc_T.cpp2
-rw-r--r--ace/Malloc_T.h20
-rw-r--r--ace/Malloc_T.i4
4 files changed, 15 insertions, 13 deletions
diff --git a/ace/Free_List.cpp b/ace/Free_List.cpp
index ff086ded2b3..9feeb85d475 100644
--- a/ace/Free_List.cpp
+++ b/ace/Free_List.cpp
@@ -68,7 +68,7 @@ ACE_Locked_Free_List<T, LOCK>::alloc (size_t n)
ACE_NEW (temp, T);
temp->set_next (this->free_list_);
this->free_list_ = temp;
- this->size_++
+ this->size_++;
}
}
diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp
index d6f784c4aad..1c7df2a1b5b 100644
--- a/ace/Malloc_T.cpp
+++ b/ace/Malloc_T.cpp
@@ -20,7 +20,7 @@ ACE_Cached_Allocator<T, LOCK>::ACE_Cached_Allocator (size_t n_chunks)
// ERRNO could be lost because this is within ctor
for (size_t c = 0 ; c < n_chunks ; c++)
- this->free_list_.add (new (&this->pool_ [c]) ACE_Cached_Mem_Pool_Node_T<T>);
+ this->free_list_.add (new (&this->pool_ [c]) ACE_Cached_Mem_Pool_Node<T>);
// put into free list using placement contructor, no real memory
// allocation in the above new
}
diff --git a/ace/Malloc_T.h b/ace/Malloc_T.h
index 35700885ce8..f352a662ac4 100644
--- a/ace/Malloc_T.h
+++ b/ace/Malloc_T.h
@@ -23,32 +23,34 @@
#include "ace/Free_List.h"
template <class T>
-class ACE_Cached_Mem_Pool_Node_T
+class ACE_Cached_Mem_Pool_Node
// = TITLE
- // ACE_Cached_Mem_Pool_Node_T keeps unused memory within free
- // list Free list structure is kept within the memory being kept.
+ // <ACE_Cached_Mem_Pool_Node> keeps unused memory within a free
+ // list.
+ //
+ // = DESCRIPTION
// 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, if you have read enough ACE
- // code, you know why this can't be done.
+ // <ACE_Cached_Allocator>. But this can't be done due to C++
+ // compiler portability problems.
{
public:
T *addr (void) { return &this->obj_; }
// return the address of free memory
- ACE_Cached_Mem_Pool_Node_T<T> *get_next (void) { return this->next_; }
+ ACE_Cached_Mem_Pool_Node<T> *get_next (void) { return this->next_; }
// get the next Mem_Pool_Node
- void set_next (ACE_Cached_Mem_Pool_Node_T<T> * ptr) { this->next_ = ptr; }
+ void set_next (ACE_Cached_Mem_Pool_Node<T> *ptr) { this->next_ = ptr; }
// set the next Mem_Pool_Node
private:
union
{
T obj_;
- ACE_Cached_Mem_Pool_Node_T<T> *next_;
+ ACE_Cached_Mem_Pool_Node<T> *next_;
} ;
};
@@ -72,7 +74,7 @@ public:
private:
T *pool_;
- ACE_Locked_Free_List<ACE_Cached_Mem_Pool_Node_T<T>, LOCK> free_list_ ;
+ ACE_Locked_Free_List<ACE_Cached_Mem_Pool_Node<T>, LOCK> free_list_;
};
template <class MALLOC>
diff --git a/ace/Malloc_T.i b/ace/Malloc_T.i
index 8b1193b3206..8beb1b4117d 100644
--- a/ace/Malloc_T.i
+++ b/ace/Malloc_T.i
@@ -11,14 +11,14 @@ ACE_Cached_Allocator<T, LOCK>::malloc (size_t nbytes)
return NULL;
// addr() call is really not absolutely necessary because of the way
- // ACE_Cached_Mem_Pool_Node_T's internal structure arranged.
+ // ACE_Cached_Mem_Pool_Node's internal structure arranged.
return this->free_list_.remove ()->addr ();
}
template <class T, class LOCK> void
ACE_Cached_Allocator<T, LOCK>::free (void * ptr)
{
- this->free_list_.add ((ACE_Cached_Mem_Pool_Node_T<T> *) ptr) ;
+ this->free_list_.add ((ACE_Cached_Mem_Pool_Node<T> *) ptr) ;
}
template <class MALLOC> ACE_INLINE void *