OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef DALVIK_VM_HEAP_SIZE_ANDROID_H_ |
| 6 #define DALVIK_VM_HEAP_SIZE_ANDROID_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 namespace webkit_glue { |
| 11 // A simple class to cache the heap size of the device. |
| 12 class DalvikHeapSize { |
| 13 public: |
| 14 // Retrieves the Singleton. |
| 15 static DalvikHeapSize* GetInstance(); |
| 16 |
| 17 DalvikHeapSize(); |
| 18 |
| 19 ~DalvikHeapSize(); |
| 20 |
| 21 int HeapSizeMB() const; |
| 22 |
| 23 private: |
| 24 int ParseHeapSize(const std::string& str) const; |
| 25 |
| 26 int heap_size_mb_; |
| 27 }; |
| 28 |
| 29 } // webkit_glue namespace |
| 30 |
| 31 #endif // DALVIK_VM_HEAP_SIZE_ANDROID_H_ |
OLD | NEW |