From 1cafbef10e82175add93cbafb2c0923e3129fd20 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 29 May 2018 23:03:19 -0700 Subject: [PATCH] ircd::allocator: Add comment for RB_PROF_ALLOC. --- ircd/allocator.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ircd/allocator.cc b/ircd/allocator.cc index 069d9a159..2b418fd24 100644 --- a/ircd/allocator.cc +++ b/ircd/allocator.cc @@ -8,6 +8,14 @@ // copyright notice and this permission notice is present in all copies. The // full license for this software is available in the LICENSE file. +// Uncomment or -D this #define to enable our own crude but simple ability to +// profile dynamic memory usage. Global `new` and `delete` will be captured +// here by this definition file into thread_local counters accessible via +// ircd::allocator::profile. This feature allows the developer to find out if +// allocations are occurring during some scope by sampling the counters. +// +// #define RB_PROF_ALLOC + // // allocator::state //