Add a MemoryLocalUnsafe object.

Some users want to take the risk and use a raw local memory reader
that simply does a memcpy instead of the slower process_vm_readv.

For example, Chromium uses libunwindstack for some performance
analysis. Because of the way Chromium works, it's not always
possible to read the elf files on disk. In this case, the elf
is backed by a memory object which means every elf read is
done using process_vm_read. Adding the MemoryLocalUnsafe object,
this particular case can be sped up to use a raw memcpy. It should
be safe since only the elf data is being read using this object.

Added unit tests for new object.

Test: All unit tests pass.
Change-Id: I8ec69b0398153c0b6ede467bae0c70fd4ed0b657
5 files changed
tree: 670c77d0e9ad2fe0609f57a67eb07010f779cf40
  1. libunwindstack/
  2. OWNERS
  3. PREUPLOAD.cfg