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

Unified Diff: src/heap/spaces.h

Issue 2032393002: [heap] Uncommit unused large object page memory. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 97f9de996f6cc8abd753072b4c003ac36bb4add9..a85dce5985021bb1145334789d4f900586442252 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -622,6 +622,7 @@ class MemoryChunk {
}
size_t size() const { return size_; }
+ void set_size(size_t size) { size_ = size; }
inline Heap* heap() const { return heap_; }
@@ -654,7 +655,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(); }
@@ -992,6 +993,10 @@ 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();
+
// 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
@@ -1443,6 +1448,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
« 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