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

Side by Side Diff: runtime/vm/clustered_snapshot.cc

Issue 2418323002: Make fatal out of memory messages uniform. (Closed)
Patch Set: macro Created 4 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
« no previous file with comments | « runtime/platform/text_buffer.cc ('k') | runtime/vm/scavenger.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 (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/clustered_snapshot.h" 5 #include "vm/clustered_snapshot.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 10 matching lines...) Expand all
21 #include "vm/timeline.h" 21 #include "vm/timeline.h"
22 #include "vm/version.h" 22 #include "vm/version.h"
23 23
24 namespace dart { 24 namespace dart {
25 25
26 static RawObject* AllocateUninitialized(PageSpace* old_space, intptr_t size) { 26 static RawObject* AllocateUninitialized(PageSpace* old_space, intptr_t size) {
27 ASSERT(Utils::IsAligned(size, kObjectAlignment)); 27 ASSERT(Utils::IsAligned(size, kObjectAlignment));
28 uword address = old_space->TryAllocateDataBumpLocked(size, 28 uword address = old_space->TryAllocateDataBumpLocked(size,
29 PageSpace::kForceGrowth); 29 PageSpace::kForceGrowth);
30 if (address == 0) { 30 if (address == 0) {
31 FATAL("Out of memory"); 31 OUT_OF_MEMORY();
32 } 32 }
33 return reinterpret_cast<RawObject*>(address + kHeapObjectTag); 33 return reinterpret_cast<RawObject*>(address + kHeapObjectTag);
34 } 34 }
35 35
36 36
37 void Deserializer::InitializeHeader(RawObject* raw, 37 void Deserializer::InitializeHeader(RawObject* raw,
38 intptr_t class_id, 38 intptr_t class_id,
39 intptr_t size, 39 intptr_t size,
40 bool is_vm_isolate, 40 bool is_vm_isolate,
41 bool is_canonical) { 41 bool is_canonical) {
(...skipping 5296 matching lines...) Expand 10 before | Expand all | Expand 10 after
5338 5338
5339 deserializer.ReadVMSnapshot(); 5339 deserializer.ReadVMSnapshot();
5340 5340
5341 Dart::set_instructions_snapshot_buffer(instructions_buffer_); 5341 Dart::set_instructions_snapshot_buffer(instructions_buffer_);
5342 Dart::set_data_snapshot_buffer(data_buffer_); 5342 Dart::set_data_snapshot_buffer(data_buffer_);
5343 5343
5344 return ApiError::null(); 5344 return ApiError::null();
5345 } 5345 }
5346 5346
5347 } // namespace dart 5347 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/platform/text_buffer.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698