blob: 2034fb9c1d071a130212bb129a72b8a50e683ad9 [file] [log] [blame]
Luis Hector Chavez645501c2016-12-28 10:56:26 -08001// Copyright 2015 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 BASE_ANDROID_JAVA_RUNTIME_H_
6#define BASE_ANDROID_JAVA_RUNTIME_H_
7
8#include "base/android/scoped_java_ref.h"
9#include "base/base_export.h"
10
11namespace base {
12namespace android {
13
14// Wrapper class for using the java.lang.Runtime object from jni.
15class BASE_EXPORT JavaRuntime {
16 public:
Luis Hector Chavez645501c2016-12-28 10:56:26 -080017 // Fills the total memory used and memory allocated for objects by the java
18 // heap in the current process. Returns true on success.
19 static void GetMemoryUsage(long* total_memory, long* free_memory);
20};
21
22} // namespace android
23} // namespace base
24
25#endif // BASE_ANDROID_JAVA_RUNTIME_H_