On Tue, Dec 19, 2017 at 1:50 PM Xuanyi Chew <che...@gmail.com> wrote:

> As such I have no idea what would happen if the GC scanner hits a
unsafe.Pointer that it cannot access. Will the pointer be marked as
unaccessible? Does it panic with SIGBUS?

I think the GC will not try to dereference a pointer that is known to point
outside of the Go runtime heap. If I'm wrong then it will panic. I suggest
to hide the potentially inaccessible unsafe.Pointer from being considered
by the GC at all by making it an uintptr instead.


-- 

-j

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to