Re: [go-nuts] Confusion about gcWork put in golang source code runtime/mgcwork.go

2018-08-18 Thread Tim Xu
I am too dumb that i thought it was a slice. Thanks a lot : ) On Fri, Aug 17, 2018 at 11:01 PM Ian Lance Taylor wrote: > On Fri, Aug 17, 2018 at 3:28 AM, wrote: > > > > I am new to golang source code, and recently met a problem about > > understanding golang gc. > > > > In runtime/mgcwork.go:

Re: [go-nuts] Confusion about gcWork put in golang source code runtime/mgcwork.go

2018-08-17 Thread Ian Lance Taylor
On Fri, Aug 17, 2018 at 3:28 AM, wrote: > > I am new to golang source code, and recently met a problem about > understanding golang gc. > > In runtime/mgcwork.go: 114 > > func (w *gcWork) put(obj uintptr) { >flushed := false >wbuf := w.wbuf1 >if wbuf == nil { > w.init() >

[go-nuts] Confusion about gcWork put in golang source code runtime/mgcwork.go

2018-08-17 Thread xiaoxubeii
Hey guys, I am new to golang source code, and recently met a problem about understanding golang gc. In runtime/mgcwork.go: 114 func (w *gcWork) put(obj uintptr) { flushed := false wbuf := w.wbuf1 if wbuf == nil { w.init() wbuf = w.wbuf1 // wbuf is empty at this