www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Re: DMD out of memory issues

On 8/6/12, Andrej Mitrovic <andrej.mitrovich gmail.com> wrote:
 Unfortunately anything big won't work because I get out of memory errors when
compiling the
 D wrapper.
It doesn't seem to be caused by any infinite loops, DMD just simply runs out of memory. I've enabled some printf's and created a log file: dmd -v -c _enum.d -I..\..\..\ > log.txt https://dl.dropbox.com/u/9218759/dmd_log.7z The module names might seem familiar because it's a D wrapper around the DMD codebase. That's about 52KSLOC for the wrapper. Why that many lines? Because there's setters/getters for non-pod fields, externs for functions and for the implementation of cross-language polymorphism. I've had about one year of work and I have a few things left to implement to make the generator properly usable (things like re-exposing template instances and merging them to D templates, and marking which functions assume the calling code has memory ownership, which would reduce and eliminate memory leaks). I don't think this is fixable without changing when DMD releases memory. Since every other usable D compiler is based on the DMD front-end this is pretty much a dead-end for my codegenerator. :/
Aug 07 2012