Share boot image methods memory in JIT zygote.
Once the zygote is done compiling, copy the ArtMethods to
shared memory that will be in-place remapped. This is
a memory optimization that enables memory sharing between
zygote and early forked processes.
Currently relies on undefined behavior of the kernel, but will
follow-up with a CL that uses file sealing that will address this.
Saves around 2MB of memory for processes forked before zygote is
done compiling - there are around a dozen of processes.
Bug: 119800099
Test: boots, PostLaunchMemoryUsage
Change-Id: Ia1bdbd1abd27f28b087d9f33aca4cd901d55082f
6 files changed