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

Side by Side Diff: src/heap/spaces.cc

Issue 1078533003: Relax heap size assert during compaction (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/platform/platform.h" 8 #include "src/base/platform/platform.h"
9 #include "src/full-codegen.h" 9 #include "src/full-codegen.h"
10 #include "src/heap/mark-compact.h" 10 #include "src/heap/mark-compact.h"
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 if ((cur <= addr) && (addr < next)) return obj; 1010 if ((cur <= addr) && (addr < next)) return obj;
1011 } 1011 }
1012 1012
1013 UNREACHABLE(); 1013 UNREACHABLE();
1014 return Smi::FromInt(0); 1014 return Smi::FromInt(0);
1015 } 1015 }
1016 1016
1017 1017
1018 bool PagedSpace::CanExpand() { 1018 bool PagedSpace::CanExpand() {
1019 DCHECK(max_capacity_ % AreaSize() == 0); 1019 DCHECK(max_capacity_ % AreaSize() == 0);
1020 DCHECK(Capacity() <= heap()->MaxOldGenerationSize()); 1020 DCHECK(heap()->mark_compact_collector()->is_compacting() ||
1021 Capacity() <= heap()->MaxOldGenerationSize());
1021 DCHECK(heap()->CommittedOldGenerationMemory() <= 1022 DCHECK(heap()->CommittedOldGenerationMemory() <=
1022 heap()->MaxOldGenerationSize() + 1023 heap()->MaxOldGenerationSize() +
1023 PagedSpace::MaxEmergencyMemoryAllocated()); 1024 PagedSpace::MaxEmergencyMemoryAllocated());
1024 1025
1025 // Are we going to exceed capacity for this space? 1026 // Are we going to exceed capacity for this space?
1026 if (!heap()->CanExpandOldGeneration(Page::kPageSize)) return false; 1027 if (!heap()->CanExpandOldGeneration(Page::kPageSize)) return false;
1027 1028
1028 return true; 1029 return true;
1029 } 1030 }
1030 1031
(...skipping 2111 matching lines...) Expand 10 before | Expand all | Expand 10 after
3142 object->ShortPrint(); 3143 object->ShortPrint();
3143 PrintF("\n"); 3144 PrintF("\n");
3144 } 3145 }
3145 printf(" --------------------------------------\n"); 3146 printf(" --------------------------------------\n");
3146 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3147 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3147 } 3148 }
3148 3149
3149 #endif // DEBUG 3150 #endif // DEBUG
3150 } 3151 }
3151 } // namespace v8::internal 3152 } // 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