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

Side by Side Diff: src/heap/heap.h

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/api.cc ('k') | src/heap/heap.cc » ('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 #ifndef V8_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 // given alignment. 559 // given alignment.
560 static int GetMaximumFillToAlign(AllocationAlignment alignment); 560 static int GetMaximumFillToAlign(AllocationAlignment alignment);
561 // Calculates the actual amount of filler required for a given address at the 561 // Calculates the actual amount of filler required for a given address at the
562 // given alignment. 562 // given alignment.
563 static int GetFillToAlign(Address address, AllocationAlignment alignment); 563 static int GetFillToAlign(Address address, AllocationAlignment alignment);
564 564
565 template <typename T> 565 template <typename T>
566 static inline bool IsOneByte(T t, int chars); 566 static inline bool IsOneByte(T t, int chars);
567 567
568 static void FatalProcessOutOfMemory(const char* location, 568 static void FatalProcessOutOfMemory(const char* location,
569 bool take_snapshot = false); 569 bool is_heap_oom = false);
570 570
571 static bool RootIsImmortalImmovable(int root_index); 571 static bool RootIsImmortalImmovable(int root_index);
572 572
573 // Checks whether the space is valid. 573 // Checks whether the space is valid.
574 static bool IsValidAllocationSpace(AllocationSpace space); 574 static bool IsValidAllocationSpace(AllocationSpace space);
575 575
576 // Generated code can embed direct references to non-writable roots if 576 // Generated code can embed direct references to non-writable roots if
577 // they are in new space. 577 // they are in new space.
578 static bool RootCanBeWrittenAfterInitialization(RootListIndex root_index); 578 static bool RootCanBeWrittenAfterInitialization(RootListIndex root_index);
579 579
(...skipping 2081 matching lines...) Expand 10 before | Expand all | Expand 10 after
2661 friend class LargeObjectSpace; 2661 friend class LargeObjectSpace;
2662 friend class NewSpace; 2662 friend class NewSpace;
2663 friend class PagedSpace; 2663 friend class PagedSpace;
2664 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); 2664 DISALLOW_COPY_AND_ASSIGN(AllocationObserver);
2665 }; 2665 };
2666 2666
2667 } // namespace internal 2667 } // namespace internal
2668 } // namespace v8 2668 } // namespace v8
2669 2669
2670 #endif // V8_HEAP_HEAP_H_ 2670 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698