Re: [go-nuts] Is GC affected by array size, and if so, when and how?

2018-05-09 Thread Ian Lance Taylor
On Tue, May 8, 2018 at 12:51 PM, wrote: > > On Tuesday, May 1, 2018 at 10:15:08 PM UTC+2, Ian Lance Taylor wrote: >> >> On Tue, May 1, 2018 at 1:00 PM, wrote: >> > >> > I looked at the source but can't understand it well enough. >> > >> > If I allocate a [1000]byte, or a []byte, I understand th

Re: [go-nuts] Is GC affected by array size, and if so, when and how?

2018-05-09 Thread klobyg
On Tuesday, May 1, 2018 at 10:15:08 PM UTC+2, Ian Lance Taylor wrote: > > On Tue, May 1, 2018 at 1:00 PM, > wrote: > > > > I looked at the source but can't understand it well enough. > > > > If I allocate a [1000]byte, or a []byte, I understand the GC will need > to > > mark the slice/arra

Re: [go-nuts] Is GC affected by array size, and if so, when and how?

2018-05-01 Thread Ian Lance Taylor
On Tue, May 1, 2018 at 1:17 PM, wrote: > > That is all as I anticipated, but I don't know where this is documented. The fact that the GC does not scan the contents of a [1000]byte is not user visible, so it doesn't really belong in user documentation. I would start with the long comment at the

Re: [go-nuts] Is GC affected by array size, and if so, when and how?

2018-05-01 Thread time4dan
That is all as I anticipated, but I don't know where this is documented. Any chance you could point me in the right direction? Even in the source code, the closest I could come to an answer was something to do with type "spans", but I'm so unfamiliar with the terminology... -- You received thi

Re: [go-nuts] Is GC affected by array size, and if so, when and how?

2018-05-01 Thread Ian Lance Taylor
On Tue, May 1, 2018 at 1:00 PM, wrote: > > I looked at the source but can't understand it well enough. > > If I allocate a [1000]byte, or a []byte, I understand the GC will need to > mark the slice/array itself for collection. However, does the GC mark all > the bytes within, and does the marking

[go-nuts] Is GC affected by array size, and if so, when and how?

2018-05-01 Thread time4dan
I looked at the source but can't understand it well enough. If I allocate a [1000]byte, or a []byte, I understand the GC will need to mark the slice/array itself for collection. However, does the GC mark all the bytes within, and does the marking phase attempt to follow all the items? Will the