Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Unified Diff: src/zone.h

Issue 1847543002: Expose a lower bound of malloc'd memory via heap statistics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | src/zone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/zone.h
diff --git a/src/zone.h b/src/zone.h
index 753e2035d3ac612060cb1391c33f29db5df9110f..fa21155fe10da907cda627a836a804ff10a272a9 100644
--- a/src/zone.h
+++ b/src/zone.h
@@ -7,7 +7,7 @@
#include <limits>
-#include "src/allocation.h"
+#include "src/base/accounting-allocator.h"
#include "src/base/logging.h"
#include "src/globals.h"
#include "src/hashmap.h"
@@ -35,7 +35,7 @@ class Segment;
// from multi-threaded code.
class Zone final {
public:
- Zone();
+ explicit Zone(base::AccountingAllocator* allocator);
~Zone();
// Allocate 'size' bytes of memory in the Zone; expands the Zone by
@@ -64,6 +64,8 @@ class Zone final {
size_t allocation_size() const { return allocation_size_; }
+ base::AccountingAllocator* allocator() const { return allocator_; }
+
private:
// All pointers returned from New() have this alignment. In addition, if the
// object being allocated has a size that is divisible by 8 then its alignment
@@ -114,6 +116,8 @@ class Zone final {
Address position_;
Address limit_;
+ base::AccountingAllocator* allocator_;
+
Segment* segment_head_;
};
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | src/zone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698