Revert "Revert "Redesign implementation of RegisterNativeAllocation.""

This reverts commit 36bdbd2bf2ee36662f700b63474b546a7abecfa3.

Bug: 29156652
Bug: 32576211
Test: 004-NativeAllocations in a loop with high machine load.
Change-Id: I4470222c66aef4e0daa7612c84177b6c35bd28a9
4 files changed