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

Unified Diff: src/mark-compact.h

Issue 6970004: Introduce lazy sweeping. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 7 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/mark-compact.h
diff --git a/src/mark-compact.h b/src/mark-compact.h
index 0cace03aef0c101760a91d517ad63bae97122565..19f13eac621d4e92ff603168f0e2e542a587986d 100644
--- a/src/mark-compact.h
+++ b/src/mark-compact.h
@@ -297,6 +297,16 @@ class MarkCompactCollector {
inline bool is_code_flushing_enabled() const { return code_flusher_ != NULL; }
void EnableCodeFlushing(bool enable);
+ enum SweeperType {
+ CONSERVATIVE,
+ LAZY_CONSERVATIVE,
+ PRECISE
+ };
+
+ // Sweep a single page from the given space conservatively.
+ // Return a number of reclaimed bytes.
+ static int SweepConservatively(PagedSpace* space, Page* p);
+
private:
MarkCompactCollector();
~MarkCompactCollector();
@@ -459,10 +469,10 @@ class MarkCompactCollector {
void SweepNewSpace(NewSpace* space);
- enum SweeperType { CONSERVATIVE, PRECISE };
void SweepSpace(PagedSpace* space, SweeperType sweeper);
+
#ifdef DEBUG
// -----------------------------------------------------------------------
// Debugging variables, functions and classes

Powered by Google App Engine
This is Rietveld 408576698