aboutsummaryrefslogtreecommitdiff
path: root/dep/acelite/ace/Malloc_T.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dep/acelite/ace/Malloc_T.cpp')
-rw-r--r--dep/acelite/ace/Malloc_T.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/dep/acelite/ace/Malloc_T.cpp b/dep/acelite/ace/Malloc_T.cpp
index 88b456d66e2..be56870f342 100644
--- a/dep/acelite/ace/Malloc_T.cpp
+++ b/dep/acelite/ace/Malloc_T.cpp
@@ -1,4 +1,4 @@
-// $Id: Malloc_T.cpp 91809 2010-09-17 07:20:41Z johnnyw $
+// $Id: Malloc_T.cpp 94341 2011-07-22 12:33:43Z schmidt $
#ifndef ACE_MALLOC_T_CPP
#define ACE_MALLOC_T_CPP
@@ -105,16 +105,17 @@ ACE_Dynamic_Cached_Allocator<ACE_LOCK>::ACE_Dynamic_Cached_Allocator
(size_t n_chunks, size_t chunk_size)
: pool_ (0),
free_list_ (ACE_PURE_FREE_LIST),
- chunk_size_(chunk_size)
+ chunk_size_ (chunk_size)
{
+ ACE_ASSERT (chunk_size > 0);
chunk_size = ACE_MALLOC_ROUNDUP (chunk_size, ACE_MALLOC_ALIGN);
- ACE_NEW (this->pool_, char[n_chunks * chunk_size_]);
+ ACE_NEW (this->pool_, char[n_chunks * chunk_size]);
for (size_t c = 0;
c < n_chunks;
c++)
{
- void* placement = this->pool_ + c * chunk_size_;
+ void *placement = this->pool_ + c * chunk_size;
this->free_list_.add (new (placement) ACE_Cached_Mem_Pool_Node<char>);
}