p.s. should such questions be posted in golang-dev, since it deals with runtime internals?
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/71d7fb5c-3ef5-4611-b9ce-299f7b90945eo%40googlegroups.com.
Do you mean that you have a problem with the value of the pointer? That is "copying the pointer." This seems impossible.Attempting to access through a pointer copied via unsafe is (generally) inviting doom, and seems highly possible. The instant the last pointer to that data goes out of scope the address range occupied by the formerly pointed to items is formally inaccessible. Using unsafe to keep a shadow copy of the address and then poking around is quite likely to fail, and even when it does not, it is quite likely to be meaningless. (random data from some other use).If I misunderstood, please forgive me.
On Sun, Jun 7, 2020 at 6:15 AM Viktor Kojouharov <vkojo...@gmail.com> wrote:
p.s. should such questions be posted in golang-dev, since it deals with runtime internals?--
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 golan...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/71d7fb5c-3ef5-4611-b9ce-299f7b90945eo%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/fa18bf7e-8965-4917-9d81-00a8f43289c3o%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/fa18bf7e-8965-4917-9d81-00a8f43289c3o%40googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/aa037e65-0e2a-47d6-b35c-8e80fc3a8000o%40googlegroups.com.
Thanks Ian. Adding to that allocation to cover the element size did the trick. Out of curiosity, the momery allocated by mallocgc is still tracked by the gc, right?A brief look at the code seems to indicate that this is the case, but I don't know how the gc works.
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/V2abC-HQvYk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/01e4daa4-568d-4d56-9691-66272e908a3do%40googlegroups.com.