"External allocation" tracking for direct buffers.
The native memory allocated for ByteBuffer.allocateDirect was not being
tracked by the VM's "external allocation" mechanism. This adds the
necessary calls to the Harmony OSMemory allocator, which is what
actually calls malloc().
The external alloc stuff just takes size values, so we tuck a copy of
the allocation size into the allocated block, and pull it out when it's
time to free the memory.
(Includes in a couple of other changes that I had to commit somewhere so
I could sync.)
3 files changed