OSDN Git Service

AArch64: Add memory allocation in low 4GB
authorStuart Monteith <stuart.monteith@arm.com>
Wed, 12 Mar 2014 12:44:01 +0000 (12:44 +0000)
committerAndreas Gampe <agampe@google.com>
Mon, 17 Mar 2014 18:32:37 +0000 (11:32 -0700)
commit8dba5aaaffc0bc2b2580bf02f0d9095c00d26a17
tree29b849a3fdffb802f8720f755a9ed0324b8e5b3f
parent01d6f6a4adea984b95af38611bc1b50268f77d03
AArch64: Add memory allocation in low 4GB

MAP_32BIT is implemented for only x86_64. Other 64bit platforms
don't have an equivalent.

This is a unsophisticated implemention of a scheme using msync and
MAP_FIXED to reproduce the functionality of MAP_32BIT.

Adds MAP_FIXED to RemapAtEnd, as the address used for the new mmap
doesn't get located correctly without it on aarch64.

Add MemMap::next_mem_pos_ to store last position. Add a safety assert.

Change-Id: I61871ff7fc327554c43e1d7f448c3d376490f1ea
runtime/mem_map.cc
runtime/mem_map.h