Index: src/spaces.cc |
diff --git a/src/spaces.cc b/src/spaces.cc |
index 8c893c07d4f1ed5844f8a9bf1e5c21ea76efead9..1b78e6d5acf30b766e829f659711f5d2395501c1 100644 |
--- a/src/spaces.cc |
+++ b/src/spaces.cc |
@@ -649,6 +649,17 @@ void MemoryAllocator::ReportStatistics() { |
#endif |
// ----------------------------------------------------------------------------- |
+// MemoryChunk implementation |
+ |
+void MemoryChunk::IncrementLiveBytesFromMutator(Address address, int by) { |
+ MemoryChunk* chunk = MemoryChunk::FromAddress(address); |
+ if (!chunk->InNewSpace()) { |
Michael Starzinger
2012/01/18 09:12:18
We need an additional check here to make sure that
Vyacheslav Egorov (Chromium)
2012/01/18 09:22:49
Yeah, thanks for catching it. Somehow I lost this
|
+ static_cast<PagedSpace*>(chunk->owner())->IncrementUnsweptFreeBytes(-by); |
+ } |
+ chunk->IncrementLiveBytes(by); |
+} |
+ |
+// ----------------------------------------------------------------------------- |
// PagedSpace implementation |
PagedSpace::PagedSpace(Heap* heap, |
@@ -2515,7 +2526,7 @@ void LargeObjectSpace::FreeUnmarkedObjects() { |
MarkBit mark_bit = Marking::MarkBitFrom(object); |
if (mark_bit.Get()) { |
mark_bit.Clear(); |
- MemoryChunk::IncrementLiveBytes(object->address(), -object->Size()); |
+ MemoryChunk::IncrementLiveBytesFromGC(object->address(), -object->Size()); |
previous = current; |
current = current->next_page(); |
} else { |