aboutsummaryrefslogtreecommitdiff
path: root/lib/scudo/scudo_allocator_combined.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/scudo/scudo_allocator_combined.h')
-rw-r--r--lib/scudo/scudo_allocator_combined.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/scudo/scudo_allocator_combined.h b/lib/scudo/scudo_allocator_combined.h
index 25e273114c23..6e40660ba9ab 100644
--- a/lib/scudo/scudo_allocator_combined.h
+++ b/lib/scudo/scudo_allocator_combined.h
@@ -16,12 +16,12 @@
#define SCUDO_ALLOCATOR_COMBINED_H_
#ifndef SCUDO_ALLOCATOR_H_
-#error "This file must be included inside scudo_allocator.h."
+# error "This file must be included inside scudo_allocator.h."
#endif
template <class PrimaryAllocator, class AllocatorCache,
class SecondaryAllocator>
-class ScudoCombinedAllocator {
+class CombinedAllocator {
public:
void init(s32 ReleaseToOSIntervalMs) {
Primary.Init(ReleaseToOSIntervalMs);
@@ -49,12 +49,6 @@ class ScudoCombinedAllocator {
Secondary.Deallocate(&Stats, Ptr);
}
- uptr getActuallyAllocatedSize(void *Ptr, uptr ClassId) {
- if (ClassId)
- return PrimaryAllocator::ClassIdToSize(ClassId);
- return Secondary.GetActuallyAllocatedSize(Ptr);
- }
-
void initCache(AllocatorCache *Cache) {
Cache->Init(&Stats);
}
@@ -67,6 +61,11 @@ class ScudoCombinedAllocator {
Stats.Get(StatType);
}
+ void printStats() {
+ Primary.PrintStats();
+ Secondary.PrintStats();
+ }
+
private:
PrimaryAllocator Primary;
SecondaryAllocator Secondary;