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/heap/heap-inl.h

Issue 2311203002: Move kMaxRegularHeapObjectSize into globals (Closed)
Patch Set: Saving the file helps... Created 4 years, 3 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/heap/objects-visiting.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 #ifndef V8_HEAP_HEAP_INL_H_ 5 #ifndef V8_HEAP_HEAP_INL_H_
6 #define V8_HEAP_HEAP_INL_H_ 6 #define V8_HEAP_HEAP_INL_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 DCHECK(gc_state_ == NOT_IN_GC); 319 DCHECK(gc_state_ == NOT_IN_GC);
320 #ifdef DEBUG 320 #ifdef DEBUG
321 if (FLAG_gc_interval >= 0 && !always_allocate() && 321 if (FLAG_gc_interval >= 0 && !always_allocate() &&
322 Heap::allocation_timeout_-- <= 0) { 322 Heap::allocation_timeout_-- <= 0) {
323 return AllocationResult::Retry(space); 323 return AllocationResult::Retry(space);
324 } 324 }
325 isolate_->counters()->objs_since_last_full()->Increment(); 325 isolate_->counters()->objs_since_last_full()->Increment();
326 isolate_->counters()->objs_since_last_young()->Increment(); 326 isolate_->counters()->objs_since_last_young()->Increment();
327 #endif 327 #endif
328 328
329 bool large_object = size_in_bytes > Page::kMaxRegularHeapObjectSize; 329 bool large_object = size_in_bytes > kMaxRegularHeapObjectSize;
330 HeapObject* object = nullptr; 330 HeapObject* object = nullptr;
331 AllocationResult allocation; 331 AllocationResult allocation;
332 if (NEW_SPACE == space) { 332 if (NEW_SPACE == space) {
333 if (large_object) { 333 if (large_object) {
334 space = LO_SPACE; 334 space = LO_SPACE;
335 } else { 335 } else {
336 allocation = new_space_.AllocateRaw(size_in_bytes, alignment); 336 allocation = new_space_.AllocateRaw(size_in_bytes, alignment);
337 if (allocation.To(&object)) { 337 if (allocation.To(&object)) {
338 OnAllocationEvent(object, size_in_bytes); 338 OnAllocationEvent(object, size_in_bytes);
339 } 339 }
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 876
877 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 877 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
878 for (Object** current = start; current < end; current++) { 878 for (Object** current = start; current < end; current++) {
879 CHECK((*current)->IsSmi()); 879 CHECK((*current)->IsSmi());
880 } 880 }
881 } 881 }
882 } // namespace internal 882 } // namespace internal
883 } // namespace v8 883 } // namespace v8
884 884
885 #endif // V8_HEAP_HEAP_INL_H_ 885 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698