Lines Matching refs:size
36 * native function used to free the allocation and the estimated size of the
45 private final long size;
63 * The <code>size</code> should be an estimate of the total number of
72 * @param size estimated size in bytes of this kind of native
74 * @throws IllegalArgumentException If <code>size</code> is negative
76 public NativeAllocationRegistry(ClassLoader classLoader, long freeFunction, long size) {
77 if (size < 0) {
78 throw new IllegalArgumentException("Invalid native allocation size: " + size);
83 this.size = size;
132 registerNativeAllocation(this.size);
187 registerNativeAllocation(this.size);
202 registerNativeFree(size);
223 // TODO: Change the runtime to support passing the size as a long instead
224 // of an int. For now, we clamp the size to fit.
225 private static void registerNativeAllocation(long size) {
226 VMRuntime.getRuntime().registerNativeAllocation((int)Math.min(size, Integer.MAX_VALUE));
229 private static void registerNativeFree(long size) {
230 VMRuntime.getRuntime().registerNativeFree((int)Math.min(size, Integer.MAX_VALUE));