[phobos] Phobos unit tests running out of memory

Dmitry Olshansky dmitry.olsh at gmail.com
Tue Sep 4 11:30:28 PDT 2012


On 04-Sep-12 21:48, Jonathan M Davis wrote:
> On Tuesday, September 04, 2012 18:28:31 Johannes Pfau wrote:
>> I think this is a known problem. When I added the std.uuid module the
>> unittests failed on the autotester because of out of memory issues. I
>> then moved the std.uuid module to a separate unit test run (SRC_STD_4,
>> in win32.mak, I tried all other SRC_STD variables, but none worked) to
>> make it work. The whole thing seems very fragile and I guess most
>> contributors just check that the unittests work on the autotester, so
>> they might fail on other machines.
> I'm well aware of all of that. What baffles me is how it's running out of memory
> on my box and not the autotester. I wouldn't have thought that it would matter
> what box you were on. But maybe memory fragmentation or something changes
> things.
> And of course, there's always the mystery of why on earth dmd runs out of
> memory at around 900MB even when there's lots more memory on the box. It's
> been like that for a long time (I've seen it for other running out of memory
> build problems), but I have no idea why that would happen. I'm not aware of
> any significance to 900MB (unlike, say 3.6 GB, when the 32-bit address space
> hits its limit).
>
A limitation of DMC runtime's allocator probably.

But I've seen different numbers over time and certainly more then 1 Gb, 
for me it usually dies closer to 2GB say ~1.4.
The actual limit for old 32bit programs is 2GB (or 3GB by stealing from 
kernel) for user space things
because the other 1-2GB of memory are in the kernel space. That it's it 
for 32bit OS.

See details (also note that 32-bit binaries have more virtual memory 
available on 64 bit windows).
http://msdn.microsoft.com/en-us/library/windows/desktop/aa366778(v=vs.85).aspx 
<http://msdn.microsoft.com/en-us/library/windows/desktop/aa366778%28v=vs.85%29.aspx>

-- 
Olshansky Dmitry



More information about the phobos mailing list