Lines Matching defs:SizeClassAllocatorLocalCache
21 template <class SizeClassAllocator> struct SizeClassAllocatorLocalCache { struct
22 typedef typename SizeClassAllocator::SizeClassMap SizeClassMap;
23 typedef typename SizeClassAllocator::CompactPtrT CompactPtrT;
25 void init(GlobalStats *S, SizeClassAllocator *A) { in init()
34 void destroy(GlobalStats *S) { in destroy()
40 void *allocate(uptr ClassId) { in allocate()
60 bool deallocate(uptr ClassId, void *P) { in deallocate()
78 bool isEmpty() const { in isEmpty()
85 void drain() { in drain()
98 void *getBatchClassBlock() { in getBatchClassBlock()
105 LocalStats &getStats() { return Stats; } in getStats()
107 void getStats(ScopedString *Str) { in getStats()
130 static u16 getMaxCached(uptr Size) { in getMaxCached()
137 static const uptr BatchClassId = SizeClassMap::BatchClassId;
138 struct alignas(SCUDO_CACHE_LINE_SIZE) PerClass {
145 PerClass PerClassArray[NumClasses] = {};
146 LocalStats Stats;
147 SizeClassAllocator *Allocator = nullptr;
149 NOINLINE void initCache() { in initCache()
164 void destroyBatch(uptr ClassId, void *B) { in destroyBatch()
169 NOINLINE bool refill(PerClass *C, uptr ClassId, u16 MaxRefill) { in refill()
177 NOINLINE void drain(PerClass *C, uptr ClassId) { in drain()