diff options
Diffstat (limited to 'deps/v8/src/base/accounting-allocator.h')
-rw-r--r-- | deps/v8/src/base/accounting-allocator.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/deps/v8/src/base/accounting-allocator.h b/deps/v8/src/base/accounting-allocator.h index ce67f3790e..4e1baf18d4 100644 --- a/deps/v8/src/base/accounting-allocator.h +++ b/deps/v8/src/base/accounting-allocator.h @@ -11,19 +11,21 @@ namespace v8 { namespace base { -class AccountingAllocator final { +class AccountingAllocator { public: AccountingAllocator() = default; - ~AccountingAllocator() = default; + virtual ~AccountingAllocator() = default; // Returns nullptr on failed allocation. - void* Allocate(size_t bytes); - void Free(void* memory, size_t bytes); + virtual void* Allocate(size_t bytes); + virtual void Free(void* memory, size_t bytes); size_t GetCurrentMemoryUsage() const; + size_t GetMaxMemoryUsage() const; private: AtomicWord current_memory_usage_ = 0; + AtomicWord max_memory_usage_ = 0; DISALLOW_COPY_AND_ASSIGN(AccountingAllocator); }; |