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
7 files changed
tree: 3bbad0d24eb69e28454fc403c7e8be1a70af1230
  1. .gitignore
  3. build/
  4. dalvikvm/
  5. jdwpspy/
  6. src/
  7. test/
  8. tools/