mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-17 01:04:34 +00:00
chore(Deps/Acelite): Update to 6.5.10 (#3450)
This commit is contained in:
12
deps/acelite/ace/Sample_History.cpp
vendored
12
deps/acelite/ace/Sample_History.cpp
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user