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

Unified Diff: src/heap/spaces.h

Issue 2109943003: [heap] Reland uncommit unused large object page memory. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 6 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/base/platform/platform-win32.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.h
diff --git a/src/heap/spaces.h b/src/heap/spaces.h
index e68fc8ef233b93fc06ce41a7a6613ce12dcfeae0..895722b0a30b6af50f50a1e52174f8bb7f60c24c 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -628,6 +628,7 @@ class MemoryChunk {
}
size_t size() const { return size_; }
+ void set_size(size_t size) { size_ = size; }
inline Heap* heap() const { return heap_; }
@@ -663,7 +664,7 @@ class MemoryChunk {
bool CommitArea(size_t requested);
// Approximate amount of physical memory committed for this chunk.
- size_t CommittedPhysicalMemory() { return high_water_mark_.Value(); }
+ size_t CommittedPhysicalMemory();
Address HighWaterMark() { return address() + high_water_mark_.Value(); }
@@ -1003,6 +1004,12 @@ class LargePage : public MemoryChunk {
inline void set_next_page(LargePage* page) { set_next_chunk(page); }
+ // Uncommit memory that is not in use anymore by the object. If the object
+ // cannot be shrunk 0 is returned.
+ Address GetAddressToShrink();
+
+ void ClearOutOfLiveRangeSlots(Address free_start);
+
// A limit to guarantee that we do not overflow typed slot offset in
// the old to old remembered set.
// Note that this limit is higher than what assembler already imposes on
@@ -1454,6 +1461,7 @@ class MemoryAllocator {
bool CommitMemory(Address addr, size_t size, Executability executable);
void FreeMemory(base::VirtualMemory* reservation, Executability executable);
+ void PartialFreeMemory(MemoryChunk* chunk, Address start_free);
void FreeMemory(Address addr, size_t size, Executability executable);
// Commit a contiguous block of memory from the initial chunk. Assumes that
@@ -3075,6 +3083,10 @@ class LargeObjectSpace : public Space {
// Frees unmarked objects.
void FreeUnmarkedObjects();
+ void InsertChunkMapEntries(LargePage* page);
+ void RemoveChunkMapEntries(LargePage* page);
+ void RemoveChunkMapEntries(LargePage* page, Address free_start);
+
// Checks whether a heap object is in this space; O(1).
bool Contains(HeapObject* obj);
// Checks whether an address is in the object area in this space. Iterates
« no previous file with comments | « src/base/platform/platform-win32.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698