mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
Some missing from merge.
Signed-off-by: Salja <salja2012@hotmail.de>
This commit is contained in:
parent
ec939a5bce
commit
f4be15a7af
1895 changed files with 160408 additions and 53601 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue