diff options
author | Hans Boehm <hboehm@google.com> | 2019-03-20 09:07:35 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-03-20 09:07:35 -0700 |
commit | 1e12a1c9378385bcc2386365b12f48e1576ca5a7 (patch) | |
tree | 967257f94ecc788aeb6c0c95e5d8f919c867e27f | |
parent | 2ac8ac6d3300b8a89898aab7f7320b6d8fa4a7ee (diff) | |
parent | cc1997c287ec8fa8990d4d391acc8d65ec27743e (diff) |
Merge "Change registerNativeAllocation to long argument" am: 308ec2cae3
am: cc1997c287
Change-Id: I5a836228d1ef921bba363778d2a0dd05e1ab89bc
-rw-r--r-- | libart/src/main/java/dalvik/system/VMRuntime.java | 13 |
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 |