summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Boehm <hboehm@google.com>2019-03-20 09:13:09 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-03-20 09:13:09 -0700
commitf26cde27e237af6a8af3767980da8ad3cf567b93 (patch)
tree2dea160d75633a129e435c2976466cd21718b5ed
parent5bcbe3b95529a38c0a3e7908c361c0d94c24f252 (diff)
parent1e12a1c9378385bcc2386365b12f48e1576ca5a7 (diff)
Merge "Change registerNativeAllocation to long argument" am: 308ec2cae3 am: cc1997c287
am: 1e12a1c937 Change-Id: Ibdaaaccece82e93de44b192d7ece7bac5d745f32
-rw-r--r--libart/src/main/java/dalvik/system/VMRuntime.java13
1 files changed, 2 insertions, 11 deletions
diff --git a/libart/src/main/java/dalvik/system/VMRuntime.java b/libart/src/main/java/dalvik/system/VMRuntime.java
index f8f37fd780..900af3044d 100644
--- a/libart/src/main/java/dalvik/system/VMRuntime.java
+++ b/libart/src/main/java/dalvik/system/VMRuntime.java
@@ -463,11 +463,7 @@ public final class VMRuntime {
*/
@UnsupportedAppUsage
@libcore.api.CorePlatformApi
- public void registerNativeAllocation(long bytes) {
- // TODO: Change the runtime to support passing the size as a long instead
- // of an int. For now, we clamp the size to fit.
- registerNativeAllocationInternal((int)Math.min(bytes, Integer.MAX_VALUE));
- }
+ public native void registerNativeAllocation(long bytes);
/**
* Backward compatibility version of registerNativeAllocation. We used to pass an int instead
@@ -481,16 +477,12 @@ public final class VMRuntime {
registerNativeAllocation((long) bytes);
}
- private native void registerNativeAllocationInternal(int bytes);
-
/**
* Registers a native free by reducing the number of native bytes accounted for.
*/
@UnsupportedAppUsage
@libcore.api.CorePlatformApi
- public void registerNativeFree(long bytes) {
- registerNativeFreeInternal((int)Math.min(bytes, Integer.MAX_VALUE));
- }
+ public native void registerNativeFree(long bytes);
/**
* Backward compatibility version of registerNativeFree.
@@ -502,7 +494,6 @@ public final class VMRuntime {
public void registerNativeFree(int bytes) {
registerNativeFree((long) bytes);
}
- private native void registerNativeFreeInternal(int bytes);
/**
* Return the number of native objects that are reported by a single call to