[go-nuts] issue with past-the-end pointer
Hi all, In this proposal https://github.com/golang/proposal/blob/master/design/24543-non-cooperative-preemption.md, it is mentioned past-the-end pointer and the fact it should be avoided. My assumption is that it could lead to a bad memory tracking/cleaning since the write barriers keep track of the change in the pointers. Is that correct? Thank you -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/123409ca-4742-4def-9643-2f23d00bab61%40googlegroups.com.
Re: [go-nuts] issue with past-the-end pointer
On Wed, Mar 18, 2020 at 9:33 AM Vincent Blanchon wrote: > > In this proposal > https://github.com/golang/proposal/blob/master/design/24543-non-cooperative-preemption.md, > it is mentioned past-the-end pointer and the fact it should be avoided. My > assumption is that it could lead to a bad memory tracking/cleaning since the > write barriers keep track of the change in the pointers. Is that correct? Pretty much, yes. A past-the-end pointer looks like a pointer to the next object, and the write barrier can't tell the difference. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVsG9Bmr%3DrMAvs8MNdaxorz9KH-i3X-CtaLQNLSjTTnTA%40mail.gmail.com.
Re: [go-nuts] issue with past-the-end pointer
Thank you Ian! Le mercredi 18 mars 2020 23:20:15 UTC+4, Ian Lance Taylor a écrit : > > On Wed, Mar 18, 2020 at 9:33 AM Vincent Blanchon > > wrote: > > > > In this proposal > https://github.com/golang/proposal/blob/master/design/24543-non-cooperative-preemption.md, > > it is mentioned past-the-end pointer and the fact it should be avoided. My > assumption is that it could lead to a bad memory tracking/cleaning since > the write barriers keep track of the change in the pointers. Is that > correct? > > Pretty much, yes. A past-the-end pointer looks like a pointer to the > next object, and the write barrier can't tell the difference. > > Ian > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/ed6c6b51-0c19-4ccc-847f-48d629570016%40googlegroups.com.