]> Cypherpunks repositories - gostls13.git/commit
runtime: lay out heap bitmap forward in memory
authorAustin Clements <austin@google.com>
Thu, 23 Jun 2016 20:25:50 +0000 (14:25 -0600)
committerAustin Clements <austin@google.com>
Thu, 15 Feb 2018 21:12:16 +0000 (21:12 +0000)
commit29e9c4d4a4064fcd5edcb47d4782bd96082a068e
tree36da49ce46d6fef82bdcdcc23d9d0cbde7135cfa
parent4de468621a54bc7816ae978a55cb347b6f60352d
runtime: lay out heap bitmap forward in memory

Currently the heap bitamp is laid in reverse order in memory relative
to the heap itself. This was originally done out of "excessive
cleverness" so that computing a bitmap pointer could load only the
arena_start field and so that heaps could be more contiguous by
growing the arena and the bitmap out from a common center point.

However, this appears to have no actual performance benefit, it
complicates nearly every use of the bitmap, and it makes already
confusing code more confusing. Furthermore, it's still possible to use
a single field (the new bitmap_delta) for the bitmap pointer
computation by employing slightly different excessive cleverness.

Hence, this CL puts the bitmap into forward order.

This is a (very) updated version of CL 9404.

Change-Id: I743587cc626c4ecd81e660658bad85b54584108c
Reviewed-on: https://go-review.googlesource.com/85881
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/malloc.go
src/runtime/mbitmap.go
src/runtime/mheap.go