| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium 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 #include "platform/heap/PagePool.h" | 5 #include "platform/heap/PagePool.h" |
| 6 | 6 |
| 7 #include "platform/heap/Heap.h" | 7 #include "platform/heap/Heap.h" |
| 8 #include "platform/heap/PageMemory.h" | 8 #include "platform/heap/PageMemory.h" |
| 9 #include "wtf/Assertions.h" | 9 #include "platform/wtf/Assertions.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 PagePool::PagePool() { | 13 PagePool::PagePool() { |
| 14 for (int i = 0; i < BlinkGC::NumberOfArenas; ++i) { | 14 for (int i = 0; i < BlinkGC::NumberOfArenas; ++i) { |
| 15 m_pool[i] = nullptr; | 15 m_pool[i] = nullptr; |
| 16 } | 16 } |
| 17 } | 17 } |
| 18 | 18 |
| 19 PagePool::~PagePool() { | 19 PagePool::~PagePool() { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 46 if (memory->commit()) | 46 if (memory->commit()) |
| 47 return memory; | 47 return memory; |
| 48 | 48 |
| 49 // We got some memory, but failed to commit it, try again. | 49 // We got some memory, but failed to commit it, try again. |
| 50 delete memory; | 50 delete memory; |
| 51 } | 51 } |
| 52 return nullptr; | 52 return nullptr; |
| 53 } | 53 } |
| 54 | 54 |
| 55 } // namespace blink | 55 } // namespace blink |
| OLD | NEW |