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

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

Issue 1873443002: Improved diagnostic message for JS heap out of memory (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Code review fix, use ternary operator Created 4 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 | « src/heap/heap.cc ('k') | src/v8.h » ('j') | 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 // 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/heap/mark-compact.h" 5 #include "src/heap/mark-compact.h"
6 6
7 #include "src/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/base/sys-info.h" 9 #include "src/base/sys-info.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1709 matching lines...) Expand 10 before | Expand all | Expand 10 after
1720 } 1720 }
1721 return allocation; 1721 return allocation;
1722 } 1722 }
1723 1723
1724 inline AllocationResult AllocateInOldSpace(int size_in_bytes, 1724 inline AllocationResult AllocateInOldSpace(int size_in_bytes,
1725 AllocationAlignment alignment) { 1725 AllocationAlignment alignment) {
1726 AllocationResult allocation = 1726 AllocationResult allocation =
1727 compaction_spaces_->Get(OLD_SPACE)->AllocateRaw(size_in_bytes, 1727 compaction_spaces_->Get(OLD_SPACE)->AllocateRaw(size_in_bytes,
1728 alignment); 1728 alignment);
1729 if (allocation.IsRetry()) { 1729 if (allocation.IsRetry()) {
1730 FatalProcessOutOfMemory( 1730 v8::internal::Heap::FatalProcessOutOfMemory(
1731 "MarkCompactCollector: semi-space copy, fallback in old gen\n"); 1731 "MarkCompactCollector: semi-space copy, fallback in old gen", true);
1732 } 1732 }
1733 return allocation; 1733 return allocation;
1734 } 1734 }
1735 1735
1736 inline AllocationResult AllocateInLab(int size_in_bytes, 1736 inline AllocationResult AllocateInLab(int size_in_bytes,
1737 AllocationAlignment alignment) { 1737 AllocationAlignment alignment) {
1738 AllocationResult allocation; 1738 AllocationResult allocation;
1739 if (!buffer_.IsValid()) { 1739 if (!buffer_.IsValid()) {
1740 if (!NewLocalAllocationBuffer()) { 1740 if (!NewLocalAllocationBuffer()) {
1741 space_to_allocate_ = OLD_SPACE; 1741 space_to_allocate_ = OLD_SPACE;
(...skipping 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after
3806 MarkBit mark_bit = Marking::MarkBitFrom(host); 3806 MarkBit mark_bit = Marking::MarkBitFrom(host);
3807 if (Marking::IsBlack(mark_bit)) { 3807 if (Marking::IsBlack(mark_bit)) {
3808 RelocInfo rinfo(isolate(), pc, RelocInfo::CODE_TARGET, 0, host); 3808 RelocInfo rinfo(isolate(), pc, RelocInfo::CODE_TARGET, 0, host);
3809 RecordRelocSlot(host, &rinfo, target); 3809 RecordRelocSlot(host, &rinfo, target);
3810 } 3810 }
3811 } 3811 }
3812 } 3812 }
3813 3813
3814 } // namespace internal 3814 } // namespace internal
3815 } // namespace v8 3815 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/v8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698