%u <[email protected]> wrote:
How gc unfriendly is an union of objects and sizet_t?union{ size_t arr[10]; Class obj[10]; }
All elements of this union will be considered pointers by the GC.
And, if multiple arrays contain exclusively the same objects, is it then safe/useful to mark all but the smallest array with gc.hasNoPointers? Any object removal/addition happens simultaneous across all the arrays.
As long as there is at least one GC registered pointer to the allocated objects, it will not be collected. Hence, if some arrays are permutations or subsets of another array, only the original array need to be marked as having pointers. -- Simen
