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

Unified Diff: src/mark-compact.h

Issue 380653003: Allow main thread to contribute to the sweeping phase. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | « no previous file | src/mark-compact.cc » ('j') | src/mark-compact.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.h
diff --git a/src/mark-compact.h b/src/mark-compact.h
index 6b7c09bab9c2dc4dc91f6ff4d360fb7a99830d9c..bcbc05606190cb7efb149e298dfd3893ef8ddf28 100644
--- a/src/mark-compact.h
+++ b/src/mark-compact.h
@@ -577,7 +577,7 @@ class MarkCompactCollector {
};
enum SweepingParallelism {
- SWEEP_SEQUENTIALLY,
+ SWEEP_ON_MAIN_THREAD,
SWEEP_IN_PARALLEL
};
@@ -590,7 +590,7 @@ class MarkCompactCollector {
#endif
// Sweep a single page from the given space conservatively.
- // Return a number of reclaimed bytes.
+ // Returns the size of the biggest continuous freed memory chunk in bytes.
template<SweepingParallelism type>
static intptr_t SweepConservatively(PagedSpace* space,
FreeList* free_list,
@@ -659,8 +659,11 @@ class MarkCompactCollector {
MarkingParity marking_parity() { return marking_parity_; }
- // Concurrent and parallel sweeping support.
- void SweepInParallel(PagedSpace* space);
+ // Concurrent and parallel sweeping support. If required_freed_bytes was set
+ // to a value larger than 0, then sweeping returns after a block of at least
+ // required_freed_bytes was freed. If required_freed_bytes was set to zero
+ // then the whole given space is swept.
+ int SweepInParallel(PagedSpace* space, int required_freed_bytes);
void WaitUntilSweepingCompleted();
« no previous file with comments | « no previous file | src/mark-compact.cc » ('j') | src/mark-compact.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698