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: Sample_History.cpp 96985 2013-04-11 15:50:32Z huangh $
#include "ace/Sample_History.h"
#if !defined (__ACE_INLINE__)
@ -8,30 +10,18 @@
#include "ace/Log_Category.h"
#include "ace/OS_Memory.h"
#if defined (ACE_HAS_ALLOC_HOOKS)
# include "ace/Malloc_Base.h"
#endif /* ACE_HAS_ALLOC_HOOKS */
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_Sample_History::ACE_Sample_History (size_t max_samples)
: max_samples_ (max_samples)
, sample_count_ (0)
{
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_ALLOCATOR(this->samples_, static_cast<ACE_UINT64*>(ACE_Allocator::instance()->malloc(sizeof(ACE_UINT64) * this->max_samples_)));
#else
ACE_NEW(this->samples_, ACE_UINT64[this->max_samples_]);
#endif /* ACE_HAS_ALLOC_HOOKS */
}
ACE_Sample_History::~ACE_Sample_History (void)
{
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_Allocator::instance()->free(this->samples_);
#else
delete[] this->samples_;
#endif /* ACE_HAS_ALLOC_HOOKS */
}
void