Disable GC entirely

Dicebot m.strashun at gmail.com
Mon Apr 8 03:08:02 PDT 2013

On Monday, 8 April 2013 at 09:31:46 UTC, Jacob Carlborg wrote:
> On 2013-04-08 10:56, Dicebot wrote:
>> Sure. Actually, executable size is an easy problem to solve 
>> considering
>> custom druntimed mentioned before. Most of size in small 
>> executables
>> come from statically linked huge druntime. (Simple experiment: 
>> use
>> "-betterC" switch and compile hello-world program linking only 
>> to C
>> stdlib. Same binary size as for C analog).
> That's cheating. It's most likely due to the C standard library 
> is being dynamically linked. If you dynamically link with the D 
> runtime and the standard library you will get the same size for 
> a Hello World in D as in C. Yes, I've tried this with Tango 
> back in the D1 days.

Erm. How so? Same C library is dynamically linked both for D and 
C programs so I am comparing raw binary size honestly here (and 
it is the same).

If you mean size of druntime is not that relevant if you link it 
dynamically - embedded application can often be the only program 
that runs on given system ("single executive" concept) and it 
makes no difference (actually, dynamic linking is not even 
possible in that case).

More information about the Digitalmars-d mailing list