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

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

Issue 581223004: Support large objects in the serializer/deserializer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: comment Created 6 years, 2 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
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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 } 214 }
215 if (allocation.To(&object)) { 215 if (allocation.To(&object)) {
216 OnAllocationEvent(object, size_in_bytes); 216 OnAllocationEvent(object, size_in_bytes);
217 } else { 217 } else {
218 old_gen_exhausted_ = true; 218 old_gen_exhausted_ = true;
219 } 219 }
220 return allocation; 220 return allocation;
221 } 221 }
222 222
223 223
224 HeapObject* Heap::ForceAllocateLargeObject(int size_in_bytes,
225 Executability executable) {
226 AlwaysAllocateScope scope(isolate());
227 AllocationResult result = lo_space_->AllocateRaw(size_in_bytes, executable);
228 return HeapObject::cast(result.ToObjectChecked());
229 }
230
231
224 void Heap::OnAllocationEvent(HeapObject* object, int size_in_bytes) { 232 void Heap::OnAllocationEvent(HeapObject* object, int size_in_bytes) {
225 HeapProfiler* profiler = isolate_->heap_profiler(); 233 HeapProfiler* profiler = isolate_->heap_profiler();
226 if (profiler->is_tracking_allocations()) { 234 if (profiler->is_tracking_allocations()) {
227 profiler->AllocationEvent(object->address(), size_in_bytes); 235 profiler->AllocationEvent(object->address(), size_in_bytes);
228 } 236 }
229 237
230 if (FLAG_verify_predictable) { 238 if (FLAG_verify_predictable) {
231 ++allocations_count_; 239 ++allocations_count_;
232 240
233 UpdateAllocationsHash(object); 241 UpdateAllocationsHash(object);
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 779
772 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 780 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
773 for (Object** current = start; current < end; current++) { 781 for (Object** current = start; current < end; current++) {
774 CHECK((*current)->IsSmi()); 782 CHECK((*current)->IsSmi());
775 } 783 }
776 } 784 }
777 } 785 }
778 } // namespace v8::internal 786 } // namespace v8::internal
779 787
780 #endif // V8_HEAP_HEAP_INL_H_ 788 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698