Classes on stack

Redwan rdwnsjjd at gmail.com
Thu Sep 1 10:51:44 UTC 2022


On Thursday, 1 September 2022 at 10:21:32 UTC, rikki cattermole 
wrote:
>
> On 01/09/2022 10:13 PM, Redwan wrote:
>> if it's for GC, how to completely disable gc? I don't Wan use 
>> it at all. I searched for a compiler command line disabling 
>> for gc but not found. GC.disable() is ugly way I think.
>
> As long as you want to use things like classes and Phobos, 
> you're stuck with the GC being linked in and active at some 
> point in the lifetime of your process.
>
> D's runtime includes a lot of infrastructure such as threading 
> that is initialized before your main ever executes.
>
> You can limit the GC activity by things like GC.disable, but 
> its still linked in and in use at some point in time.
>
> D's GC is your friend, if you don't allocate it won't attempt 
> to collect unless you want it to.

well I know it's my friend, but we're just friend :) I don't want 
to use it because it's uses alot of heap and I don't like it. my 
case is special and all of heap usages needs to be done by me. so 
I want to do something to avoid this dynamic and runtime linkages 
and etc and be pure and in my hand. definitely it must be some 
flags or configurations to disable this stuff for a system 
language. am I right?


More information about the Digitalmars-d mailing list