summaryrefslogtreecommitdiff
path: root/test/slicecap.go
Commit message (Collapse)AuthorAgeFilesLines
* cmd/gc, runtime: treat slices and strings like pointers in garbage collectionRuss Cox2014-08-251-0/+90
Before, a slice with cap=0 or a string with len=0 might have its base pointer pointing beyond the actual slice/string data into the next block. The collector had to ignore slices and strings with cap=0 in order to avoid misinterpreting the base pointer. Now, a slice with cap=0 or a string with len=0 still has a base pointer pointing into the actual slice/string data, no matter what. The collector can now always scan the pointer, which means strings and slices are no longer special. Fixes issue 8404. LGTM=khr, josharian R=josharian, khr, dvyukov CC=golang-codereviews https://codereview.appspot.com/112570044