0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-11 06:28:55 +02:00

ircd::allocator: Include aligned allocs in profile.

This commit is contained in:
Jason Volk 2019-04-18 00:26:23 -07:00
parent afdf0efbd1
commit 51b3e63959

View file

@ -507,6 +507,12 @@ ircd::allocator::aligned_alloc(const size_t &align,
assert(ret != nullptr);
assert(uintptr_t(ret) % alignment == 0);
#ifdef RB_PROF_ALLOC
auto &this_thread(ircd::allocator::profile::this_thread);
this_thread.alloc_bytes += size;
this_thread.alloc_count++;
#endif
return
{
reinterpret_cast<char *>(ret), &std::free