Revision: 10009
Author:   [email protected]
Date:     Wed Nov 16 14:25:56 2011
Log: Reset allocation info when we are releasing the page that contains allocation top.

[email protected]
BUG=103587

Review URL: http://codereview.chromium.org/8575006
http://code.google.com/p/v8/source/detail?r=10009

Modified:
 /branches/bleeding_edge/src/spaces.cc

=======================================
--- /branches/bleeding_edge/src/spaces.cc       Thu Nov 10 07:16:57 2011
+++ /branches/bleeding_edge/src/spaces.cc       Wed Nov 16 14:25:56 2011
@@ -767,6 +767,10 @@
     accounting_stats_.AllocateBytes(size);
     ASSERT_EQ(Page::kObjectAreaSize, static_cast<int>(size));
   }
+
+  if (Page::FromAllocationTop(allocation_info_.top) == page) {
+    allocation_info_.top = allocation_info_.limit = NULL;
+  }

   page->Unlink();
   if (page->IsFlagSet(MemoryChunk::CONTAINS_ONLY_DATA)) {
@@ -2118,7 +2122,7 @@
 void PagedSpace::EvictEvacuationCandidatesFromFreeLists() {
   if (allocation_info_.top >= allocation_info_.limit) return;

-  if (Page::FromAddress(allocation_info_.top)->IsEvacuationCandidate()) {
+ if (Page::FromAllocationTop(allocation_info_.top)->IsEvacuationCandidate()) {
     // Create filler object to keep page iterable if it was iterable.
     int remaining =
         static_cast<int>(allocation_info_.limit - allocation_info_.top);

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to