Use the break position of the current mspace for sizing the zygote heap.

Previously, the mspace footprint used the "overhead" of a heap which
underestimates the size of the zygote heap by 16 bytes, the specific
size of a descriptor deposited at the start of an mspace containing
the control information about that mspace.  If a heap is a multiple of
a page or within 15 bytes of it, the size of the new heap would be
underestimated.

Bad things happened when this underestimate was used to create an
application heap.  The starting address of the application heap was
based on a correctly computed value instead of the underestimate.
This caused the application heap to be one page to large and end one
page beyond where it should.  This additional page happened to overlap
the first page one of the heap bitmaps.  Furthermore, the mspace
routine would proceed access protect that page thinking it was unused
free space.  During the next GC reads to the first page of the bitmap
would generate a SIGSEGV.

By using the break position, correctly rounded, for all sizing
computations this problem no longer exists.

Change-Id: Icb3c82731e589747e8e4cf16d0797052e64b3ad5
1 file changed