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/mark-compact.cc

Issue 8051014: Fix slot buffers of abandoned evacuation candidates. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment by Vyacheslav Egorov. Created 9 years, 2 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 | « no previous file | 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 2672 matching lines...) Expand 10 before | Expand all | Expand 10 after
2683 p->IsFlagSet(Page::RESCAN_ON_EVACUATION)); 2683 p->IsFlagSet(Page::RESCAN_ON_EVACUATION));
2684 if (p->IsEvacuationCandidate()) { 2684 if (p->IsEvacuationCandidate()) {
2685 // During compaction we might have to request a new page. 2685 // During compaction we might have to request a new page.
2686 // Check that space still have room for that. 2686 // Check that space still have room for that.
2687 if (static_cast<PagedSpace*>(p->owner())->CanExpand()) { 2687 if (static_cast<PagedSpace*>(p->owner())->CanExpand()) {
2688 EvacuateLiveObjectsFromPage(p); 2688 EvacuateLiveObjectsFromPage(p);
2689 } else { 2689 } else {
2690 // Without room for expansion evacuation is not guaranteed to succeed. 2690 // Without room for expansion evacuation is not guaranteed to succeed.
2691 // Pessimistically abandon unevacuated pages. 2691 // Pessimistically abandon unevacuated pages.
2692 for (int j = i; j < npages; j++) { 2692 for (int j = i; j < npages; j++) {
2693 evacuation_candidates_[j]->ClearEvacuationCandidate(); 2693 Page* page = evacuation_candidates_[j];
2694 evacuation_candidates_[j]->SetFlag(Page::RESCAN_ON_EVACUATION); 2694 slots_buffer_allocator_.DeallocateChain(page->slots_buffer_address());
2695 page->ClearEvacuationCandidate();
2696 page->SetFlag(Page::RESCAN_ON_EVACUATION);
2695 } 2697 }
2696 return; 2698 return;
2697 } 2699 }
2698 } 2700 }
2699 } 2701 }
2700 } 2702 }
2701 2703
2702 2704
2703 class EvacuationWeakObjectRetainer : public WeakObjectRetainer { 2705 class EvacuationWeakObjectRetainer : public WeakObjectRetainer {
2704 public: 2706 public:
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
3838 while (buffer != NULL) { 3840 while (buffer != NULL) {
3839 SlotsBuffer* next_buffer = buffer->next(); 3841 SlotsBuffer* next_buffer = buffer->next();
3840 DeallocateBuffer(buffer); 3842 DeallocateBuffer(buffer);
3841 buffer = next_buffer; 3843 buffer = next_buffer;
3842 } 3844 }
3843 *buffer_address = NULL; 3845 *buffer_address = NULL;
3844 } 3846 }
3845 3847
3846 3848
3847 } } // namespace v8::internal 3849 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698