Concern about dmd memory usage on win32
Jonathan M Davis
jmdavisProg at gmx.com
Tue Dec 11 03:18:32 PST 2012
On Friday, December 07, 2012 15:23:36 monarch_dodra wrote:
> In particular, when compiling "-unittest std\algorithm.d", dmd
> uses *nearly* 1 GB (it uses about 1,051,176K on my machine).
>
> Problem is that when it reaches 1GB, it crashes. I have a pull
> request which adds a few unittests to algorithm, and it is
> consistently crashing on win32 with an out of memory error.
>
> In layman's terms: std\algorithm.d is full. You literally can't
> add any more unittests to it, without crashing dmd on win32.
>
> I'd have recommended splitting the unittests in sub-modules or
> whatnot, but come to think about it, I'm actually more concern
> that a module could *singlehandedly* make the compiler crash on
> out of memory...
>
> Also, I'm no expert, but why is my dmd limited to 1 GB memory on
> my 64 bit machine...?
Don just made some changes to Tuple so that it no longer uses
std.metastrings.Format (which is _insanely_ inefficient), which may fix the
memory problem that you were running into. Obviously, dmd still has issues,
but a major one in the library was fixed (though we should really look at
killing std.metastrings entirely, because it's too inefficient to reasonably use
and the new format should now work with CTFE, unlike the old one - which is
why Format exists in the first place).
- Jonathan M Davis
More information about the Digitalmars-d
mailing list