]> Cypherpunks repositories - gostls13.git/commit
runtime: factor out bitmap, finalizer code from malloc/mgc
authorRuss Cox <rsc@golang.org>
Fri, 16 Jan 2015 19:43:38 +0000 (14:43 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 19 Jan 2015 16:26:51 +0000 (16:26 +0000)
commit3965d7508ef6387c1e524e812fda6ccef221723b
tree3c0646f39dc6effd2ebb882a859e9461d897635e
parentfd880f8d26ac76e77e56e989b2c0bf2913b5dfb7
runtime: factor out bitmap, finalizer code from malloc/mgc

The code in mfinal.go is moved from malloc*.go and mgc*.go
and substantially unchanged.

The code in mbitmap.go is also moved from those files, but
cleaned up so that it can be called from those files (in most cases
the code being moved was not already a standalone function).
I also renamed the constants and wrote comments describing
the format. The result is a significant cleanup and isolation of
the bitmap code, but, roughly speaking, it should be treated
and reviewed as new code.

The other files changed only as much as necessary to support
this code movement.

This CL does NOT change the semantics of the heap or type
bitmaps at all, although there are now some obvious opportunities
to do so in followup CLs.

Change-Id: I41b8d5de87ad1d3cd322709931ab25e659dbb21d
Reviewed-on: https://go-review.googlesource.com/2991
Reviewed-by: Keith Randall <khr@golang.org>
13 files changed:
src/runtime/gcinfo_test.go
src/runtime/heapdump.go
src/runtime/malloc.go
src/runtime/malloc1.go
src/runtime/malloc2.go
src/runtime/mbarrier.go
src/runtime/mbitmap.go [new file with mode: 0644]
src/runtime/mcentral.go
src/runtime/mfinal.go [new file with mode: 0644]
src/runtime/mgc.go
src/runtime/mgc1.go [deleted file]
src/runtime/stack1.go
src/runtime/type.go