chore(Deps/Acelite): Update to 6.5.10 (#3450)

This commit is contained in:
Kargatum
2020-11-11 22:09:02 +07:00
committed by GitHub
parent a93565b6da
commit e27201cee2
921 changed files with 18238 additions and 33164 deletions

View File

@@ -8,18 +8,30 @@
#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