12/7/2012 6:23 PM, monarch_dodra пишет:
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.
Yup, it dies the same way on auto-tester for my pull.
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...?
It's not large address-space aware (a matter of a proper bit set in PE
header) thus is limited to 2Gb. The other part of problem has to do
with the way DMC run-time allocates virtual memory. Somebody fixed it
but the patch failed to get any recognition.
--
Dmitry Olshansky