diff options
Diffstat (limited to 'standalone/local_cache.h')
-rw-r--r-- | standalone/local_cache.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/standalone/local_cache.h b/standalone/local_cache.h index 50039379fa0..f46645f9bad 100644 --- a/standalone/local_cache.h +++ b/standalone/local_cache.h @@ -49,18 +49,14 @@ template <class SizeClassAllocator> struct SizeClassAllocatorLocalCache { CompactPtrT Batch[MaxNumCached]; }; - void initLinkerInitialized(GlobalStats *S, SizeClassAllocator *A) { - Stats.initLinkerInitialized(); + void init(GlobalStats *S, SizeClassAllocator *A) { + DCHECK(isEmpty()); + Stats.init(); if (LIKELY(S)) S->link(&Stats); Allocator = A; } - void init(GlobalStats *S, SizeClassAllocator *A) { - memset(this, 0, sizeof(*this)); - initLinkerInitialized(S, A); - } - void destroy(GlobalStats *S) { drain(); if (LIKELY(S)) |