Thinking about how to make Go memory safe without using atomics everywhere: 1. Double bounds check slice indexing: i.e. store length of backing store on heap and check it. 2. Box interface types on heap. 3. Implement maps in Go with no unsafe. I think this works?
-
-
If you were creating Go-like slices in Java, double check is what you would effectively be doing, because the JVM enforces bounds checks on arrays by consulting the underlying allocation.
-
Thanks. Is capacity computable from length for certain size classes? I should go read the impl, but in similar cases I've seen, there's a way to shrink the state to two words.
- 5 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.