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

Unified Diff: src/zone/zone.h

Issue 2348303002: Replaced different means of zone pooling/reusing by one zone segment pool (Closed)
Patch Set: Added most recent changes from master Created 4 years, 2 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/v8.gyp ('k') | src/zone/zone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/zone/zone.h
diff --git a/src/zone/zone.h b/src/zone/zone.h
index a86eff36cf2a9ab1837727da301916f41a71bd06..f97662ab20ab9e7aad2f4c98588d3ab43ff8f720 100644
--- a/src/zone/zone.h
+++ b/src/zone/zone.h
@@ -44,9 +44,6 @@ class V8_EXPORT_PRIVATE Zone final {
return static_cast<T*>(New(length * sizeof(T)));
}
- // Deletes all objects and free all memory allocated in the Zone.
- void DeleteAll();
-
// Returns true if more memory has been allocated in zones than
// the limit allows.
bool excess_allocation() const {
@@ -77,6 +74,9 @@ class V8_EXPORT_PRIVATE Zone final {
// Report zone excess when allocation exceeds this limit.
static const size_t kExcessLimit = 256 * MB;
+ // Deletes all objects and free all memory allocated in the Zone.
+ void DeleteAll();
+
// The number of bytes allocated in this zone so far.
size_t allocation_size_;
@@ -125,19 +125,6 @@ class ZoneObject {
void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); }
};
-// The ZoneScope is used to automatically call DeleteAll() on a
-// Zone when the ZoneScope is destroyed (i.e. goes out of scope)
-class ZoneScope final {
- public:
- explicit ZoneScope(Zone* zone) : zone_(zone) {}
- ~ZoneScope() { zone_->DeleteAll(); }
-
- Zone* zone() const { return zone_; }
-
- private:
- Zone* zone_;
-};
-
// The ZoneAllocationPolicy is used to specialize generic data
// structures to allocate themselves and their elements in the Zone.
class ZoneAllocationPolicy final {
« no previous file with comments | « src/v8.gyp ('k') | src/zone/zone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698