On 14/09/16 09:05, Walter Bright wrote:
On 9/13/2016 10:38 PM, Shachar Shemesh wrote:
But if you do want to allow it, then my original problem comes back.
You have to
scan the malloced memory because you are not sure where that memory might
contain pointers to GC managed memory.

If mallocing for types that are statically known at compile time, it
should be knowable if they need scanning or not.


I believe you are under the assumption that structs will not be GC allocated. I don't think it is a good assumption to make. Even if it is, however:

struct SomeStruct {
  string something;
}

Please let me know if scanning this struct for GC pointers is necessary or not. Also, even if this is knowable, I'm not sure how you are suggesting we mange it.

The only practical approach I see is that if any RC managed memory might contain pointers to GC managed memory, then all RC managed memory needs to be scanned (unless you think the compiler can help out with that).

Shachar

Reply via email to