Commit 987ccff4 authored by Mathieu Chartier's avatar Mathieu Chartier
Browse files

Native allocation accounting

Added two new functions: registerNativeAllocation and registerNativeFree.
These functions should be used to let the GC know about native allocations
which are held live by Java objects and released in finalizers. GC are performed
or requested from within registerNativeAllocation when the total number of native
bytes accounted for exceeds a certain threshold. After a GC occurs in
registerNativeAllocation, finalizers are run so that the native memory is freed.
Added a test which shows how to use these functions.

Change-Id: I40f3c79e1c02d5008dec7d58d61c5bb97ec2fc1b
parent df6df998
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment