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

Side by Side Diff: src/mark-compact.cc

Issue 10552002: Unify promotion and allocation limit computation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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/heap.cc ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3799 matching lines...) Expand 10 before | Expand all | Expand 10 after
3810 PageIterator it(space); 3810 PageIterator it(space);
3811 3811
3812 intptr_t freed_bytes = 0; 3812 intptr_t freed_bytes = 0;
3813 int pages_swept = 0; 3813 int pages_swept = 0;
3814 intptr_t newspace_size = space->heap()->new_space()->Size(); 3814 intptr_t newspace_size = space->heap()->new_space()->Size();
3815 bool lazy_sweeping_active = false; 3815 bool lazy_sweeping_active = false;
3816 bool unused_page_present = false; 3816 bool unused_page_present = false;
3817 3817
3818 intptr_t old_space_size = heap()->PromotedSpaceSizeOfObjects(); 3818 intptr_t old_space_size = heap()->PromotedSpaceSizeOfObjects();
3819 intptr_t space_left = 3819 intptr_t space_left =
3820 Min(heap()->OldGenPromotionLimit(old_space_size), 3820 Min(heap()->OldGenLimit(old_space_size, Heap::kMinPromotionLimit),
3821 heap()->OldGenAllocationLimit(old_space_size)) - old_space_size; 3821 heap()->OldGenLimit(old_space_size, Heap::kMinAllocationLimit)) -
3822 old_space_size;
3822 3823
3823 while (it.has_next()) { 3824 while (it.has_next()) {
3824 Page* p = it.next(); 3825 Page* p = it.next();
3825 3826
3826 // Clear sweeping flags indicating that marking bits are still intact. 3827 // Clear sweeping flags indicating that marking bits are still intact.
3827 p->ClearSweptPrecisely(); 3828 p->ClearSweptPrecisely();
3828 p->ClearSweptConservatively(); 3829 p->ClearSweptConservatively();
3829 3830
3830 if (p->IsEvacuationCandidate()) { 3831 if (p->IsEvacuationCandidate()) {
3831 ASSERT(evacuation_candidates_.length() > 0); 3832 ASSERT(evacuation_candidates_.length() > 0);
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
4121 while (buffer != NULL) { 4122 while (buffer != NULL) {
4122 SlotsBuffer* next_buffer = buffer->next(); 4123 SlotsBuffer* next_buffer = buffer->next();
4123 DeallocateBuffer(buffer); 4124 DeallocateBuffer(buffer);
4124 buffer = next_buffer; 4125 buffer = next_buffer;
4125 } 4126 }
4126 *buffer_address = NULL; 4127 *buffer_address = NULL;
4127 } 4128 }
4128 4129
4129 4130
4130 } } // namespace v8::internal 4131 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698