Some missing from merge.

Signed-off-by: Salja <salja2012@hotmail.de>
This commit is contained in:
Salja 2012-08-05 14:54:07 +02:00 committed by Antz
parent ec939a5bce
commit f4be15a7af
1895 changed files with 160408 additions and 53601 deletions

View file

@ -1,3 +1,5 @@
// $Id: Local_Memory_Pool.cpp 96985 2013-04-11 15:50:32Z huangh $
// Local_Memory_Pool.cpp
#include "ace/Local_Memory_Pool.h"
#include "ace/Auto_Ptr.h"
@ -53,15 +55,9 @@ ACE_Local_Memory_Pool::acquire (size_t nbytes,
rounded_bytes = this->round_up (nbytes);
char *temp = 0;
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_ALLOCATOR_RETURN (temp,
static_cast<char*>(ACE_Allocator::instance()->malloc(sizeof(char) * rounded_bytes)),
0);
#else
ACE_NEW_RETURN (temp,
char[rounded_bytes],
0);
#endif /* ACE_HAS_ALLOC_HOOKS */
ACE_Auto_Basic_Array_Ptr<char> cp (temp);
@ -82,12 +78,7 @@ ACE_Local_Memory_Pool::release (int)
for (ACE_Unbounded_Set<char *>::iterator i = this->allocated_chunks_.begin ();
i != this->allocated_chunks_.end ();
++i)
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_Allocator::instance()->free(*i);
#else
delete [] *i;
#endif /* ACE_HAS_ALLOC_HOOKS */
this->allocated_chunks_.reset ();
return 0;
}