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

Side by Side Diff: src/spaces.cc

Issue 7841036: Fix several bugs in compaction: (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects-visiting-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2002 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 heap()->FreeQueuedChunks(); 2013 heap()->FreeQueuedChunks();
2014 2014
2015 return IsSweepingComplete(); 2015 return IsSweepingComplete();
2016 } 2016 }
2017 2017
2018 2018
2019 void PagedSpace::EvictEvacuationCandidatesFromFreeLists() { 2019 void PagedSpace::EvictEvacuationCandidatesFromFreeLists() {
2020 if (allocation_info_.top >= allocation_info_.limit) return; 2020 if (allocation_info_.top >= allocation_info_.limit) return;
2021 2021
2022 if (Page::FromAddress(allocation_info_.top)->IsEvacuationCandidate()) { 2022 if (Page::FromAddress(allocation_info_.top)->IsEvacuationCandidate()) {
2023 allocation_info_.top = NULL; 2023 // Create filler object to keep page iterable if it was iterable.
2024 allocation_info_.limit = NULL; 2024 int remaining =
2025 static_cast<int>(allocation_info_.limit - allocation_info_.top);
2026 heap()->CreateFillerObjectAt(allocation_info_.top, remaining);
2027
2028 allocation_info_.top = NULL;
2029 allocation_info_.limit = NULL;
2025 } 2030 }
2026 } 2031 }
2027 2032
2028 2033
2029 HeapObject* PagedSpace::SlowAllocateRaw(int size_in_bytes) { 2034 HeapObject* PagedSpace::SlowAllocateRaw(int size_in_bytes) {
2030 // Allocation in this space has failed. 2035 // Allocation in this space has failed.
2031 2036
2032 // Free list allocation failed and there is no next page. Fail if we have 2037 // Free list allocation failed and there is no next page. Fail if we have
2033 // hit the old generation size limit that should cause a garbage 2038 // hit the old generation size limit that should cause a garbage
2034 // collection. 2039 // collection.
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
2500 for (HeapObject* obj = obj_it.Next(); obj != NULL; obj = obj_it.Next()) { 2505 for (HeapObject* obj = obj_it.Next(); obj != NULL; obj = obj_it.Next()) {
2501 if (obj->IsCode()) { 2506 if (obj->IsCode()) {
2502 Code* code = Code::cast(obj); 2507 Code* code = Code::cast(obj);
2503 isolate->code_kind_statistics()[code->kind()] += code->Size(); 2508 isolate->code_kind_statistics()[code->kind()] += code->Size();
2504 } 2509 }
2505 } 2510 }
2506 } 2511 }
2507 #endif // DEBUG 2512 #endif // DEBUG
2508 2513
2509 } } // namespace v8::internal 2514 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-visiting-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698