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

Unified Diff: webkit/glue/dalvik_heap_size_android.h

Issue 10113009: Set Android/V8 memory limits from dalvik.vm.heapsize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/glue/dalvik_heap_size_android.cc » ('j') | webkit/glue/dalvik_heap_size_android.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/dalvik_heap_size_android.h
diff --git a/webkit/glue/dalvik_heap_size_android.h b/webkit/glue/dalvik_heap_size_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..9dc9734bcfe5f8cb2e050d284e1fef8022d1fe4e
--- /dev/null
+++ b/webkit/glue/dalvik_heap_size_android.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DALVIK_VM_HEAP_SIZE_ANDROID_H_
+#define DALVIK_VM_HEAP_SIZE_ANDROID_H_
+
+#include <string>
+
+namespace webkit_glue {
+// A simple class to cache the heap size of the device.
+class DalvikHeapSize {
+ public:
+ // Retrieves the Singleton.
+ static DalvikHeapSize* GetInstance();
+
+ DalvikHeapSize();
+
+ ~DalvikHeapSize();
+
+ int HeapSizeMB() const;
+
+ private:
+ int ParseHeapSize(const std::string& str) const;
+
+ int heap_size_mb_;
+};
+
+} // webkit_glue namespace
+
+#endif // DALVIK_VM_HEAP_SIZE_ANDROID_H_
« no previous file with comments | « no previous file | webkit/glue/dalvik_heap_size_android.cc » ('j') | webkit/glue/dalvik_heap_size_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698