October 14, 2010 Re: GC interpreting integer values as pointers | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ivo Kasiuk | On Thu, 14 Oct 2010 13:35:13 -0400, Ivo Kasiuk <i.kasiuk@gmx.de> wrote:
>
> There is one case though that I am still not sure about: associative
> arrays. It seems that keys as well as values in AAs are scanned for
> pointers even if both are integer types. How can I tell the GC that I do
> not want them to be scanned? I know about the NO_SCAN flag but what
> memory region should it be applied to in this case?
This is a common problem. I am not intimately familiar with AAs, but it may have something to do with the fact that it's not a templated type. That means the runtime is responsible for allocating AA nodes.
I think at the moment there is no way to do this. I also think there is likely a bug report to this effect, and that others may have implemented better AAs to fix the issue. Try searching the bug database for AA and NO_SCAN.
-Steve
|
Copyright © 1999-2021 by the D Language Foundation