Need to Allocate more space than size_t

  • Thread starter ramasubramanian.rahul
  • Start date
T

Tor Rustad

Frederick said:
Tor Rustad:



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?

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,149
Latest member
Vinay Kumar Nevatia0
Top