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

Unified Diff: src/zone/zone.h

Issue 2335343007: Pool implementation for zone segments (Closed)
Patch Set: Removing one layers of pointers Created 4 years, 3 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
Index: src/zone/zone.h
diff --git a/src/zone/zone.h b/src/zone/zone.h
index d6309e2dc0f481f2ffc5fcbae0e102e44b5bd2e4..752a03564b640103e36f8ae7ebbce3ea431c8db7 100644
--- a/src/zone/zone.h
+++ b/src/zone/zone.h
@@ -25,7 +25,7 @@ namespace internal {
//
// Note: There is no need to initialize the Zone; the first time an
// allocation is attempted, a segment of memory will be requested
-// through a call to malloc().
+// through the allocator.
//
// Note: The implementation is inherently not thread safe. Do not use
// from multi-threaded code.
@@ -44,14 +44,9 @@ class Zone final {
return static_cast<T*>(New(length * sizeof(T)));
}
- // Deletes all objects and free all memory allocated in the Zone. Keeps one
- // small (size <= kMaximumKeptSegmentSize) segment around if it finds one.
+ // Deletes all objects and free all memory allocated in the Zone.
void DeleteAll();
- // Deletes the last small segment kept around by DeleteAll(). You
- // may no longer allocate in the Zone after a call to this method.
- void DeleteKeptSegment();
-
// Returns true if more memory has been allocated in zones than
// the limit allows.
bool excess_allocation() const {
@@ -79,9 +74,6 @@ class Zone final {
// Never allocate segments larger than this size in bytes.
static const size_t kMaximumSegmentSize = 1 * MB;
- // Never keep segments larger than this size in bytes around.
- static const size_t kMaximumKeptSegmentSize = 64 * KB;
-
// Report zone excess when allocation exceeds this limit.
static const size_t kExcessLimit = 256 * MB;

Powered by Google App Engine
This is Rietveld 408576698