diff options
Diffstat (limited to 'lib/xray/xray_profile_collector.cc')
-rw-r--r-- | lib/xray/xray_profile_collector.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/xray/xray_profile_collector.cc b/lib/xray/xray_profile_collector.cc index 9d057863e..5da8073f5 100644 --- a/lib/xray/xray_profile_collector.cc +++ b/lib/xray/xray_profile_collector.cc @@ -16,8 +16,8 @@ #include "sanitizer_common/sanitizer_common.h" #include "sanitizer_common/sanitizer_vector.h" #include "xray_profiling_flags.h" -#include <pthread.h> #include <memory> +#include <pthread.h> #include <utility> namespace __xray { @@ -55,7 +55,8 @@ void post(const FunctionCallTrie &T, tid_t TId) { GlobalAllocators = reinterpret_cast<FunctionCallTrie::Allocators *>( InternalAlloc(sizeof(FunctionCallTrie::Allocators))); new (GlobalAllocators) FunctionCallTrie::Allocators(); - *GlobalAllocators = FunctionCallTrie::InitAllocators(); + *GlobalAllocators = FunctionCallTrie::InitAllocatorsCustom( + profilingFlags()->global_allocator_max); }); DCHECK_NE(GlobalAllocators, nullptr); @@ -83,12 +84,11 @@ void post(const FunctionCallTrie &T, tid_t TId) { // and is decoupled from the lifetime management required by the managed // allocator we have in XRay. // - Item->Trie = reinterpret_cast<FunctionCallTrie *>( - InternalAlloc(sizeof(FunctionCallTrie))); + Item->Trie = reinterpret_cast<FunctionCallTrie *>(InternalAlloc( + sizeof(FunctionCallTrie), nullptr, alignof(FunctionCallTrie))); DCHECK_NE(Item->Trie, nullptr); new (Item->Trie) FunctionCallTrie(*GlobalAllocators); } - DCHECK_NE(Item, nullptr); T.deepCopyInto(*Item->Trie); } |