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

Unified Diff: src/heap/spaces.h

Issue 1354383002: [heap] Add more tasks for parallel compaction (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix accounting of memory shared among paged spaces Created 5 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
« no previous file with comments | « src/heap/mark-compact.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 b8fc9b7efe0845d4852b6660c8465abdda18f115..58c619029d61b8092f874f20cd8cd107df069c50 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -1631,6 +1631,11 @@ class FreeList {
intptr_t Concatenate(FreeList* free_list);
+ // Divide {this} free lists up among {other_free_lists} up to some certain
+ // {limit} of bytes. Note that this operation needs to iterate over nodes
+ // one-by-one, making it a potentially slow operation.
+ void Divide(FreeList** other_free_lists, int num, intptr_t limit);
+
// Clear the free list.
void Reset();
@@ -1997,6 +2002,14 @@ class PagedSpace : public Space {
virtual bool is_local() { return false; }
+ // Adds external memory starting at {start} of {size_in_bytes} to the space.
+ void AddExternalMemory(Address start, int size_in_bytes) {
Hannes Payer (out of office) 2015/09/23 08:47:22 Call it AddMemory, to get the naming in sync with
+ IncreaseCapacity(size_in_bytes);
+ Free(start, size_in_bytes);
+ }
+
+ void RemoveMemory(int size) { accounting_stats_.DecreaseCapacity(size); }
Hannes Payer (out of office) 2015/09/23 08:47:22 To make this one dual with AddMemory, it should ac
Michael Lippautz 2015/09/23 11:49:01 Done.
+
protected:
// PagedSpaces that should be included in snapshots have different, i.e.,
// smaller, initial pages.
@@ -2744,12 +2757,6 @@ class CompactionSpace : public PagedSpace {
CompactionSpace(Heap* heap, AllocationSpace id, Executability executable)
: PagedSpace(heap, id, executable) {}
- // Adds external memory starting at {start} of {size_in_bytes} to the space.
- void AddExternalMemory(Address start, int size_in_bytes) {
- IncreaseCapacity(size_in_bytes);
- Free(start, size_in_bytes);
- }
-
virtual bool is_local() { return true; }
protected:
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698