Program size, linking matter, and static this()

Steven Schveighoffer schveiguy at yahoo.com
Mon Dec 19 10:19:19 PST 2011


On Mon, 19 Dec 2011 13:09:18 -0500, torhu <no at spam.invalid> wrote:

> On 19.12.2011 16:08, Steven Schveighoffer wrote:
>> On Fri, 16 Dec 2011 17:30:44 -0500, torhu<no at spam.invalid>  wrote:
>>
>>>  On 16.12.2011 22:28, Steven Schveighoffer wrote:
>>>>  In short, dlls will solve the problem, let's work on that instead of
>>>>  shuffling around code.
>>>
>>>  How exactly do they solve the problem?  An exe plus a DLL version of  
>>> the
>>>  library will usually be larger than just a statically linked exe.
>>
>> The DLL is loaded into memory once.  With static linking, it's loaded
>> every time you run an exe.
>
> I thought we were talking about distribution sizes, not memory use.  But  
> anyway, DLL's won't do a lot as long as people don't have a whole bunch  
> of D programs installed.

Right, in order for dlls to make a difference, you need to separate the  
library install from the exe install, as is done most of the time.

If you are installing one D application on your box, what would be the  
issue with the size anyway?  The complaint is generally that the size is  
much bigger than a hello world compiled for C/C++, which obviously doesn't  
take into account that the C/C++ standard libraries are DLLs.

-Steve


More information about the Digitalmars-d mailing list