D with minimal runtime
Jacob Carlborg
doob at me.com
Wed Jun 17 09:06:26 UTC 2020
On 2020-06-17 06:08, H. S. Teoh wrote:
> As of recent releases, GC initialization is actually lazy now, it will
> not initialize anything until you actually use it. Still one step away
> from being totally optional, granted, but it shouldn't be *too*
> difficult to make it so that, e.g., the GC code isn't even linked unless
> there's a reference to one of its symbols somewhere.
How would the GC know if it needs to initialize itself if you allocate
the object at compile time, i.e.:
__gshared a = new Object; // module scope
Or is it expected that the above object fill never be freed?
What about the TLS data, isn't that used for the GC? This data is
retrieved eagerly when a new thread is started. But since you'll always
have at least one thread the data will always be retrieved?
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list