1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

feat(): use boost::make_shared b/c most distros can't do allocate_shared for array types.

This commit is contained in:
drrtuy
2024-12-03 22:10:42 +00:00
parent 5f1bd3be12
commit 4e86123a5a
4 changed files with 115 additions and 98 deletions

View File

@ -61,6 +61,7 @@ public:
T* ptr = static_cast<T*>(::operator new(n * sizeof(T)));
// std::cout << "[Allocate] " << n * sizeof(T) << " bytes at " << static_cast<void*>(ptr)
// << ". current timit: " << std::dec << memoryLimitRef_.load() << std::hex << " bytes.\n";
// std::cout << std::dec;
return ptr;
}
@ -87,6 +88,7 @@ public:
memoryLimitRef_.fetch_add(n * sizeof(T), std::memory_order_relaxed);
// std::cout << "[Deallocate] " << n * sizeof(T) << " bytes from " << static_cast<void*>(ptr)
// << ". current timit: " << std::dec << memoryLimitRef_.load() << std::hex << " bytes.\n";
// std::cout << std::dec;
}
// Equality operators (allocators are equal if they share the same counter)