mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 15:00:51 +01:00
ircd::allocator: Include aligned allocs in profile.
This commit is contained in:
parent
afdf0efbd1
commit
51b3e63959
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue