Is DMD 2.052 32-bit?

Jonathan M Davis jmdavisProg at gmx.com
Wed Mar 9 19:08:04 PST 2011


On Wednesday 09 March 2011 17:56:13 Walter Bright wrote:
> On 3/9/2011 4:30 PM, Jonathan M Davis wrote:
> > Much as I'd love to have a 64-bit binary of dmd, I don't think that the
> > gain is even vaguely worth the risk at this point.
> 
> What is the gain? The only thing I can think of is some 64 bit OS
> distributions are hostile to 32 bit binaries.

Well, the fact that you then have a binary native to your system is obviously a 
gain (and is likely the one which people will cite most often), and that _does_ 
count for quite a lot. However, regardless of that, it's actually pretty easy to 
get dmd to run out of memory when compiling if you do much in the way of CTFE or 
template stuff. Granted, fixing some of the worst memory-related bugs in dmd will 
go a _long_ way towards fixing that, but even if they are, you're theoretically 
eventually supposed to be able to do pretty much anything at compile time which 
you can do at runtime in SafeD. And using enough memory that you require the 64-
bit address space would be one of the things that you can do in SafeD when 
compiling for 64-bit. As long as the compiler is only 32-bit, you can't do that 
at compile time even though you can do it at runtime (though the current 
limitations of CTFE do reduce the problem in that you can't do a lot of stuff at 
compile time period).

In any case, the fact that dmd runs out of memory fairly easily makes having a 
64-bit version which could use all of my machine's memory really attractive. And 
honestly, having an actual, 64-bit binary to run on a 64-bit system is something 
that people generally want, and it _is_ definitely a problem to get a 32-bit 
binary into the 64-bit release of a Liunx distro.

Truth be told, I would have thought that it would be a given that there would be 
a 64-bit version of dmd when going to support 64-bit compilation and was quite 
surprised when that was not your intention.

- Jonathan M Davis


More information about the Digitalmars-d mailing list