DMD memory management

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 15 03:54:28 PDT 2015


On Mon, 15 Jun 2015 13:07:46 +0300, Dmitry Olshansky wrote:

> Truth be told it never made any sense - it only suitable for immutables
> - AST, ID pool and few others. For instance, lots and lots of AA-s are
> short-lived per analyzed scope.
> 
> Even for immutables using region-style allocator with "releaseAll" would
> be much safer strategy with same gains. Also never deallocating means we
> can't use tooling such as valgrind to pin down real memory leaks.
> 
> 
>> Hint: when you need to swap out over 2GB of memory (with 16GB of
>> physical ram installed), this strategy completely and utterly stops
>> making sense.
>>
> Agreed.

that is, this approach to reduce compilation times is wrong. storing 
partially analyzed ASTs on disk as easily parsable binary representations 
(preferably ones that can be mmaped and used as-is) is right. updating 
the caches when more templates are semanticed is right. even moving off 
the system linker in favor of much simplier and faster homegrown linker 
is right for some cases. too much work, though...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150615/2d6de584/attachment.sig>


More information about the Digitalmars-d mailing list