Is there a maximum memory GHC can use/reach? Specifically, can GHC address more than 4gb of memory? -Alex- _________________________________________________________________ S. Alexander Jacobson mailto:me@alexjacobson.com tel:917-770-6565 http://alexjacobson.com
alex:
Is there a maximum memory GHC can use/reach? Specifically, can GHC address more than 4gb of memory?
SimonM may want to comment, but at the moment I think GHC is limited to 4G, but only due to lack of 64bit machines/demand on the developers. If you look in ghc/rts/MBlock.h you'll see some references to this. I *think* it would be easy to overcome this limit. (this should really be on glasgow-haskell-users) -- Don
dons@cse.unsw.edu.au (Donald Bruce Stewart) writes:
SimonM may want to comment, but at the moment I think GHC is limited to 4G, but only due to lack of 64bit machines/demand on the developers.
There is an IA64 port somewhere, and I suspect other 64-bit architectures as well. Presumably they support >4Gb? (I am possibly "lack of demand"; my application could really use lots of memory, and I had access to an SGI Altix. Never got around to trying to port GHC, and when somebody else had done it, I no longer had access to the machine. Oh well.) -kzm -- If I haven't seen further, it is by standing in the footprints of giants
On Fri, Feb 13, 2004 at 10:20:43AM +0100, Ketil Malde wrote:
dons@cse.unsw.edu.au (Donald Bruce Stewart) writes:
SimonM may want to comment, but at the moment I think GHC is limited to 4G, but only due to lack of 64bit machines/demand on the developers.
There is an IA64 port somewhere, and I suspect other 64-bit architectures as well. Presumably they support >4Gb?
I wonder if such an effort is worthwhile. If all pointers are suddenly twice the size then the footprint of a program roughly doubles. Hence to run a program that that needs more than 4GB of RAM on a 32 bit architecture you would need more than 8GB of RAM on a 64 bit machine (and e.g. Apples G5 machines only support 8GB of on-board memory). It would be interesting if Haskell programs could run in the lower 4 GB while running in 64 bit mode. Then you could have large data structures (or memory mapped files) in C land. Axel.
Axel Simon <A.Simon@kent.ac.uk> writes:
There is an IA64 port somewhere, and I suspect other 64-bit architectures as well. Presumably they support >4Gb?
I wonder if such an effort is worthwhile. If all pointers are suddenly twice the size then the footprint of a program roughly doubles.
Unless you do additional tricks. Since we're still some way from 2^64 memory, perhaps part of the pointers could contain data (tags, say) as well? This means more than a straightforward port, though, and I've no idea how feasible it would be to implement.
Hence to run a program that that needs more than 4GB of RAM on a 32 bit architecture you would need more than 8GB of RAM on a 64 bit machine (and e.g. Apples G5 machines only support 8GB of on-board memory).
Well - so be it. There are 64bit machines out there that supports more than 8Gb. It'll be expensive, but at least possible.
It would be interesting if Haskell programs could run in the lower 4 GB while running in 64 bit mode. Then you could have large data structures (or memory mapped files) in C land.
That's an interesting possibility -- at least part of my program is a large UArray of Word8, which could probably be FFI'ed relatively easily. -kzm -- If I haven't seen further, it is by standing in the footprints of giants
On 13 Feb 2004, Ketil Malde wrote:
Axel Simon <A.Simon@kent.ac.uk> writes:
I wonder if such an effort is worthwhile. If all pointers are suddenly twice the size then the footprint of a program roughly doubles. [...] It would be interesting if Haskell programs could run in the lower 4 GB while running in 64 bit mode. Then you could have large data structures (or memory mapped files) in C land.
That's an interesting possibility -- at least part of my program is a large UArray of Word8, which could probably be FFI'ed relatively easily.
... but which doesn't need to be, because UArrays of Word8 will not grow in size, no matter how large the pointers. :-) Seriously, this seems like a good approach to supporting 64 bits cheaply: put everything in the lower 4GB except for arrays. (They'd have an indirection box with a 64-bit pointer in the lower 4GB.) Does anyone need more than 4GB of non-array data?
Hmm..how about 32 bit pointers, but with 8 byte boundary alignment? This should give an effective pointer size of 35 bits, adressing up to 32Gb.
This is also a good idea. -- Ben
Axel Simon <A.Simon@kent.ac.uk> writes:
There is an IA64 port somewhere, and I suspect other 64-bit architectures as well. Presumably they support >4Gb?
I wonder if such an effort is worthwhile. If all pointers are suddenly twice the size then the footprint of a program roughly doubles.
Hmm..how about 32 bit pointers, but with 8 byte boundary alignment? This should give an effective pointer size of 35 bits, adressing up to 32Gb. -kzm -- If I haven't seen further, it is by standing in the footprints of giants
participants (5)
-
Axel Simon -
Ben Rudiak-Gould -
dons@cse.unsw.edu.au -
Ketil Malde -
S. Alexander Jacobson