Since we have the whole GcHandle system, we have a nice way of figuring out if something can be moved or not. Could we exploit this to create a compacting collector somehow?
We'd need to be careful, because the worst case is probably someone holding a GcHandle forever. (Meaning we'd need to keep that data live.)
Note:
This would prevent us allowing situational deref
The perf win is probably not too much since we need to allocate for every handle anyway
This should probably be done as part of a larger effort to make the backend pluggable
Since we have the whole
GcHandle
system, we have a nice way of figuring out if something can be moved or not. Could we exploit this to create a compacting collector somehow?We'd need to be careful, because the worst case is probably someone holding a
GcHandle
forever. (Meaning we'd need to keep that data live.)Note: