Commit 34b8e11d authored by vegorov@chromium.org's avatar vegorov@chromium.org

Reset allocation info when we are releasing the page that contains allocation top.

R=erik.corry@gmail.com
BUG=103587

Review URL: http://codereview.chromium.org/8575006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 20786b32
......@@ -768,6 +768,10 @@ void PagedSpace::ReleasePage(Page* page) {
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)) {
heap()->isolate()->memory_allocator()->Free(page);
......@@ -2118,7 +2122,7 @@ bool PagedSpace::AdvanceSweeper(intptr_t bytes_to_sweep) {
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment