Chromium Code Reviews| Index: runtime/vm/pages.cc |
| =================================================================== |
| --- runtime/vm/pages.cc (revision 42408) |
| +++ runtime/vm/pages.cc (working copy) |
| @@ -61,6 +61,10 @@ |
| HeapPage* HeapPage::Allocate(intptr_t size_in_words, PageType type) { |
| VirtualMemory* memory = |
| VerifiedMemory::Reserve(size_in_words << kWordSizeLog2); |
| + if (memory == NULL) { |
| + FATAL1("Out of memory while allocating %" Pd " words.\n", |
| + size_in_words); |
| + } |
| return Initialize(memory, type); |
| } |
| @@ -1001,7 +1005,7 @@ |
| return 0; |
| } else { |
| ASSERT(total_time >= gc_time); |
| - int result= static_cast<int>((static_cast<double>(gc_time) / |
| + int result = static_cast<int>((static_cast<double>(gc_time) / |
| static_cast<double>(total_time)) * 100); |
|
Ivan Posva
2014/12/17 01:27:38
Weird indent.
koda
2014/12/17 01:43:08
Done.
|
| return result; |
| } |