3 ms·
There's an API call into the GC that does just that, tell you if it points into the GC pool or not. Unfortunately, it's not fast enough.
by WalterBright 4y ago
There's an API call into the GC that does just that, tell you if it points into the GC pool or not.
Unfortunately, it's not fast enough.
- zozbot234 4y agoWhy does this have to be a runtime check? Perhaps the compiler could optimize pointer writes that can be proven not to affect garbage-collected objects, by dispensing with the memory barrier overhead for those.