]> Cypherpunks repositories - gostls13.git/commit
runtime: struct Obj in mgc0.c and buffers in scanblock()
authorJan Ziak <0xe2.0x9a.0x9b@gmail.com>
Mon, 17 Dec 2012 00:32:12 +0000 (19:32 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 17 Dec 2012 00:32:12 +0000 (19:32 -0500)
commit013fa63c901e4a08548821bcc46393584b8c701e
tree7548a9c9e9f357466b62be036afc6935024b199a
parentc00371eafd6d53217354e61c97afba57e455c8cc
runtime: struct Obj in mgc0.c and buffers in scanblock()

Details:

- This CL is the conceptual skeleton of code found in CL 6114046

- The garbage collector uses struct Obj to specify memory blocks

- scanblock() is putting found memory blocks into an intermediate buffer
  (xbuf) before adding/flushing them to the main work buffer (wbuf)

- The main loop in scanblock() is replaced with a skeleton code that
  in the future will be able to recognize the type of objects and
  thus will improve the garbage collector's precision.
  For now, all objects are simply sequences of pointers so
  the precision of the garbage collector remains unchanged.

- The code plugs .gcdata and .gcbss sections into the garbage collector.
  scanblock() in this CL is unable to make any use of this.

R=rsc, dvyukov, remyoudompheng
CC=dave, golang-dev, minux.ma
https://golang.org/cl/6856121
src/pkg/runtime/mgc0.c