diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2011-07-22 12:33:43 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2011-07-22 12:33:43 +0000 |
commit | 769b6fe1f285539e027c02c5b5a10f88ce5b4d43 (patch) | |
tree | d06dd4410fff8d07bc3e9654560f5dbfef159c8e /ACE/ace/Malloc_T.cpp | |
parent | cf44e6620fbe2e2b82ca8184c762198301201d9d (diff) | |
download | ATCD-769b6fe1f285539e027c02c5b5a10f88ce5b4d43.tar.gz |
ChangeLogTag:Fri
Diffstat (limited to 'ACE/ace/Malloc_T.cpp')
-rw-r--r-- | ACE/ace/Malloc_T.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ACE/ace/Malloc_T.cpp b/ACE/ace/Malloc_T.cpp index 9f732e09c5a..ffa9772644a 100644 --- a/ACE/ace/Malloc_T.cpp +++ b/ACE/ace/Malloc_T.cpp @@ -107,14 +107,15 @@ ACE_Dynamic_Cached_Allocator<ACE_LOCK>::ACE_Dynamic_Cached_Allocator free_list_ (ACE_PURE_FREE_LIST), 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>); } |