Frederick Gotham wrote:
Tor Rustad:
Frederick Gotham wrote:
Solutions:
(1) Unfortunately, you'll have to resort to
implementation-specific means.
The problem is that OP's implementation doesn't
support his HW archtecture.
If you're supposed to be able to allocate a terrabyte of
memory without resorting to implementation-specific means,
then "size_t" should be able to hold a large enough value.
FYI, *size_t* is NOT likely to be the main problem.
If this is indeed intended, then the implementation is
flawed in that size_t isn't big enough.
Why even consider the implementation is flawed?
Even if that was the case... is there really a way to fix
it, without having the compiler sources?
(2) You'll have to contact your compiler manufacturer
and ask for a fix, or perhaps try fix it yourself (e.g.
altering the size_t typedef)
How is changing size_t typedef gonna help?
Perhaps it's defined(Do you "declare" or do you "define" a
typedef?) as follows in his/her system headers:
typedef long unsigned size_t;
And I ask once more, what is the purpose of doing this?
What are you gonna use this new size_t for?
Of course, this might mess up his/her entire system.
Yes, invoking undefined behavior might do that.
--
Tor <torust AT online DOT no>