Home
last modified time | relevance | path

Searched refs:nativePtr (Results 1 – 3 of 3) sorted by relevance

/libcore/luni/src/main/java/libcore/util/
DNativeAllocationRegistry.java256 public @NonNull Runnable registerNativeAllocation(@NonNull Object referent, long nativePtr) { in registerNativeAllocation() argument
260 if (nativePtr == 0) { in registerNativeAllocation()
272 applyFreeFunction(freeFunction, nativePtr); in registerNativeAllocation()
276 thunk.setNativePtr(nativePtr); in registerNativeAllocation()
283 private long nativePtr; field in NativeAllocationRegistry.CleanerThunk
286 this.nativePtr = 0; in CleanerThunk()
290 if (nativePtr != 0) { in run()
291 applyFreeFunction(freeFunction, nativePtr); in run()
296 public void setNativePtr(long nativePtr) { in setNativePtr() argument
297 this.nativePtr = nativePtr; in setNativePtr()
[all …]
/libcore/luni/src/main/native/
Dlibcore_util_NativeAllocationRegistry.cpp26 void* nativePtr = reinterpret_cast<void*>(static_cast<uintptr_t>(ptr)); in NativeAllocationRegistry_applyFreeFunction() local
29 nativeFreeFunction(nativePtr); in NativeAllocationRegistry_applyFreeFunction()
/libcore/luni/src/test/java/libcore/libcore/util/
DNativeAllocationRegistryTest.java165 long nativePtr = doNativeAllocation(size); in testEarlyFree() local
167 Runnable cleaner = registry.registerNativeAllocation(referent, nativePtr); in testEarlyFree()
191 long nativePtr = doNativeAllocation(size); in testApplyFreeFunction() local
195 NativeAllocationRegistry.applyFreeFunction(getNativeFinalizer(), nativePtr); in testApplyFreeFunction() local