Re: Can 32-bit apps possibly access more than 4GB ???
On Dec 19, 3:26 pm, Jonathan Lee <cho...@shaw.ca> wrote:
On Dec 19, 7:53 am, James Kanze <james.ka...@gmail.com> wrote:
First, both Windows and Linux are 64 bt OS's.
Not *necessarily*. And besides, he stipulated he was running
32-bit.
I may have misread, but I understood that he wanted his code to
be able to run in both. (And reading my statement out of
context, I don't like it. Both Windows and Linux have versions
of the OS which have full 64 bit support. If you still manage
to find an older machine with only 32 bits, however, then
obviously, the OS will also only use 32 bits.)
You mean, like we did back in the 1970's, before virtual
memory became wide spread.
Yup. Stupid as it sounds, what are you going to do if you need
more memory than the OS will give you? You're going to store
intermediate values to disk.
Again, I may have misunderstood, but what I understood was that
he wanted to use as much memory as the system would give him,
both under 32 bits and 64 bits. If you do need more, obviously,
you're going to have to divide and conquer somehow.
It depends on the configuration of the process. You can ask
for 3MB in some 32 bit modes, and of course, in a 64 bit
mode, you can ask for a lot more.
But it's a matter of practice, not theory. I run and program
in 64-bit linux. I can *ask* for 8GB, it doesn't mean I'll get
it. I think the OP would like to know what to do in the event
of that failure.
I think we understood the OP's problem differently. My
impression was that he was asking how to write and compile a
code so that it could ask for 8GB (or more) on a 64 bit machine,
but would still run on a 32 bit machine (asking for less,
obviously, since he can't address 8GB).
--
James Kanze