• Russ Cox's avatar
    runtime: drop chan circular linked list in favor of circular buffer · 507df959
    Russ Cox authored
    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 #1676.
    
    R=ken2, r
    CC=golang-dev
    https://golang.org/cl/4411045
    507df959
Name
Last commit
Last update
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
libmach Loading commit data...
pkg Loading commit data...
Make.ccmd Loading commit data...
Make.clib Loading commit data...
Make.cmd Loading commit data...
Make.common Loading commit data...
Make.inc Loading commit data...
Make.pkg Loading commit data...
all-qemu.bash Loading commit data...
all.bash Loading commit data...
clean.bash Loading commit data...
env.bash Loading commit data...
make.bash Loading commit data...
quietgcc.bash Loading commit data...
run.bash Loading commit data...
sudo.bash Loading commit data...
version.bash Loading commit data...