<div dir="ltr"><div><div>With win32, I can no longer run unittests:<br>------------------<br><div>dmd -O -w -d -property -L/co -c -unittest -ofunittest5.obj std\algorithm.d<br>Error: out of memory<br>------------------<br>
</div><div>This has happened many times before, and we dealt with it by reducing the number of modules we compiled into each object file.  We once had 30 modules per obj file. Then fifteen. Then five. But now we're at one, that workaround can no longer be used.<br>
</div>The idea that we can continue to throw billions of templates and imports into every Phobos module, is leading us towards catastrophe.<br><br></div>Sure, you can say, the compiler should improve its memory management. But I don't think that's really the problem. If it was better, then compiler might not run out of memory, but it would run unusably slowly. I think most people have no idea of just how many templates the compiler is being asked to instantiate.<br>
Every import has a cost, and that cost is far from zero.<br><br></div>I'm stuck, and I don't know what to do.<br></div>