Thread overview | |||||
---|---|---|---|---|---|
|
October 27, 2017 Role of third argument to GC.addRange | ||||
---|---|---|---|---|
| ||||
The docs for the third argument to https://dlang.org/library/core/memory/gc.add_range.html says: "The GC might use this information to improve scanning for pointers or to call finalizers." Can somebody elaborate a bit on what "improve scanning" means here? |
October 27, 2017 Re: Role of third argument to GC.addRange | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | On Friday, 27 October 2017 at 14:18:02 UTC, Nordlöw wrote:
> Can somebody elaborate a bit on what "improve scanning" means here?
I believe it is so it can skip scanning stuff like ubyte[] for pointers and in the future might be used for precise scanning on structs with pointers and data combined.
|
October 27, 2017 Re: Role of third argument to GC.addRange | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | On 10/27/17 10:18 AM, Nordlöw wrote:
> The docs for the third argument to
>
> https://dlang.org/library/core/memory/gc.add_range.html
>
> says:
>
> "The GC might use this information to improve scanning for pointers or to call finalizers."
>
> Can somebody elaborate a bit on what "improve scanning" means here?
Currently, the TypeInfo is needed if you want to call the destructor of a struct.
Eventually, if we ever have precise scanning, the TypeInfo may provide a way to only scan reference types within the block, eliminating sources of false pointers.
-Steve
|
Copyright © 1999-2021 by the D Language Foundation