<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span>Dmd has steadily been making binaries more bloated for the last couple years (many times pointed out in the NG and there are several bugzilla reports).<br></span></div><div><br><span></span></div><div><span>Also, I discovered dmd has a problem with unit tests affecting object size, even when they are turned off. See a bug I created:</span></div><div><br><span></span></div><div><span>http://d.puremagic.com/issues/show_bug.cgi?id=5560<br></span></div><div><br><span></span></div><div><span>I'm not so sure dmd doesn't play a role in this problem. There is definitely something going on with the compiler adding unnecessary bloat somewhere. It seems to have to do with the -lib switch.</span></div><div><br><span></span></div><div><span>Has anyone tried compiling phobos without the -lib switch to see if it
helps?<br></span></div><div><br><span></span></div><div><span>-Steve<br></span></div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Walter Bright <walter@digitalmars.com><br><b><span style="font-weight: bold;">To:</span></b> Discuss the phobos library for D <phobos@puremagic.com><br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, May 3, 2011 1:43 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [phobos] FreeBSD 32 still fails unittests for std.datetime<br></font><br>
<br><br>On 5/2/2011 9:18 PM, Walter Bright wrote:<br>><br>><br>> On 5/2/2011 1:14 PM, Jonathan M Davis wrote:<br>>><br>>> The problem is far worse on Windows than on Linux - both in terms of the<br>>> amount of memory eaten by dmd and because the Windows unit tests are all<br>>> compiled together instead of separately, but dmd still eats too much memory on<br>>> OSes other than Windows. FreeBSD would have the unit tests compiled separately<br>>> like on Linux, so dmd shouldn't be running out of memory in the same way as<br>>> occurs on Windows, but it could still be using a lot of memory, and if<br>>> Walter's machine doesn't have a lot of it, and if FreeBSD tries to kill<br>>> processes that use too much, then that could be the problem. On Windows, it<br>>> very clearly states that dmd ran out of memory, but if the OS just kills the<br>>> process, then you might not get such a
clear message.<br>>><br>>> I've been hoping that Don's CTFE fixes would reduce dmd's memory footprint<br>>> enough to get rid of issue 5454, but since they're buggy enough that Phobos'<br>>> unit tests don't currently build, I have no idea how close they've gotten to<br>>> fixing the problem.<br>>><br>><br>> On FreeBSD it's getting a "Killed: 9" message while running dmd after running <br>> for a looong time. Running under gdb shows it dying somewhere deep in malloc().<br>><br><br>By deleting unittests one by one, I got it to pass dmd. Now if fails with a <br>"Killed: 9" message from ld, the linker. Checking the object file for datetime.o <br>yields a 4.6 Mb file (and that's without debug info turned on!). Clearly, <br>reducing the memory consumption of dmd will not fix this problem.<br><br>Compiling std.datetime with -release -O gives a 441,000 byte object
file.<br>_______________________________________________<br>phobos mailing list<br><a ymailto="mailto:phobos@puremagic.com" href="mailto:phobos@puremagic.com">phobos@puremagic.com</a><br>http://lists.puremagic.com/mailman/listinfo/phobos<br><br><br></div></div></blockquote></div></div></body></html>