handles: use real pointers to keep track of handles #296
Loading…
Reference in New Issue
No description provided.
Delete Branch "cmn/track-real-pointers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
With the change to 1.6 rules, we couldn't use the Go pointers, so we
went with casting the list indices into pointers.
The runtime does not like this, however. It will sometimes detect that
we have a pointer with a very small value and consider it an invalid
pointer, bringing down the application with it.
Work around that by asking libc for the smallest amount of memory it'll
give us so we have an actual allocated pointer to use. We then use this
pointer value as the key in our map to find the Go object we're
tracking.