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

Unified Diff: src/spaces.h

Issue 9178021: When adjusting page's live bytes counter from the mutator adjust owners unswept free bytes counter. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 11 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/runtime.cc ('k') | src/spaces.cc » ('j') | src/spaces.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.h
diff --git a/src/spaces.h b/src/spaces.h
index dc61949d19406faef903219d363884c9ec06bdfb..f49873ac4ffb5303b9b7227391625105ea623368 100644
--- a/src/spaces.h
+++ b/src/spaces.h
@@ -472,10 +472,13 @@ class MemoryChunk {
ASSERT(static_cast<unsigned>(live_byte_count_) <= size_);
return live_byte_count_;
}
- static void IncrementLiveBytes(Address address, int by) {
+
+ static void IncrementLiveBytesFromGC(Address address, int by) {
MemoryChunk::FromAddress(address)->IncrementLiveBytes(by);
}
+ static void IncrementLiveBytesFromMutator(Address address, int by);
+
static const intptr_t kAlignment =
(static_cast<uintptr_t>(1) << kPageSizeBits);
@@ -1563,6 +1566,10 @@ class PagedSpace : public Space {
first_unswept_page_ = first;
}
+ void IncrementUnsweptFreeBytes(int by) {
+ unswept_free_bytes_ += by;
+ }
+
void IncreaseUnsweptFreeBytes(Page* p) {
ASSERT(ShouldBeSweptLazily(p));
unswept_free_bytes_ += (Page::kObjectAreaSize - p->LiveBytes());
« no previous file with comments | « src/runtime.cc ('k') | src/spaces.cc » ('j') | src/spaces.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698