diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-10-23 17:52:22 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-10-23 17:52:22 +0000 |
commit | 3a1720af1d7f43edc5b214cde0be11bfb94d077e (patch) | |
tree | 029e0ff2d5e3c0eaf2405fd8e669555fdf5e1297 /lib/scudo/standalone/secondary.h | |
parent | 8f3cadc28cb2bb9e8f9d69eeaaea1f57f2f7b2ab (diff) |
Notes
Diffstat (limited to 'lib/scudo/standalone/secondary.h')
-rw-r--r-- | lib/scudo/standalone/secondary.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/scudo/standalone/secondary.h b/lib/scudo/standalone/secondary.h index 9124e2a41c6a..9d074a57c772 100644 --- a/lib/scudo/standalone/secondary.h +++ b/lib/scudo/standalone/secondary.h @@ -12,6 +12,7 @@ #include "common.h" #include "mutex.h" #include "stats.h" +#include "string_utils.h" namespace scudo { @@ -50,7 +51,7 @@ class MapAllocator { public: void initLinkerInitialized(GlobalStats *S) { Stats.initLinkerInitialized(); - if (S) + if (LIKELY(S)) S->link(&Stats); } void init(GlobalStats *S) { @@ -70,7 +71,7 @@ public: return getBlockEnd(Ptr) - reinterpret_cast<uptr>(Ptr); } - void printStats() const; + void getStats(ScopedString *Str) const; void disable() { Mutex.lock(); } |