Descriptionruntime: drop chan circular linked list in favor of circular buffer
The list elements are already being allocated out of a
single memory buffer. We can drop the Link* pointer
following and the memory it requires, replacing it with
index operations.
The change also keeps a channel from containing a pointer
back into its own allocation block, which would create a
cycle. Blocks involved in cycles are not guaranteed to be
finalized properly, and channels depend on finalizers to
free OS-level locks on some systems. The self-reference
was keeping channels from being garbage collected.
runtime-gdb.py will need to be updated in order to dump
the content of buffered channels with the new data structure.
Fixes issue 1676.
Patch Set 1 #Patch Set 2 : diff -r fbb8752309fb https://go.googlecode.com/hg/ #Patch Set 3 : diff -r c7fd6d20426a https://go.googlecode.com/hg/ #Patch Set 4 : diff -r c7fd6d20426a https://go.googlecode.com/hg/ #
MessagesTotal messages: 8
|