Think about this case:
s := make([]byte, 512, 1024)
(*reflect.SliceHeader)((unsafe.Pointer(&s))).Cap = 512
are the last 512 bytes memory can be collected by the GC?
Whether it is or not, Why?
As far as I know, the current garbage collector will not collect partial slices or strings. The same is true for:
s=s[:512:512] // Like your example but idiomatically starting in Go1.3
s=s[128:] // first 128 elements are not collected.