jacob navia wrote:
user923005 a écrit :
jacob navia wrote:
>No, this is impossible in 32 bit size_t systems!!!
Why? The calloc() call has two parameters. There is no reason that
the total allocation cannot exceed the value of a size_t.
BTW, there are definitely 32 bit systems that will allocate memory in
excess of 32 bits. For example:
http://support.microsoft.com/kb/274750
This is irrelevant. Those links refer as to how
to use certain flags in the boot.ini to allow
*3GB* if user space. (!!!!!!!)
And 3GB is well below a 32 bit size_t.
With a 32 bit size_t and pointer size how can you
address more than 4GB?
But this is a well known tactic.
A tactic to achieve what ?
>
Since I present the code, I do the effort of making all those
measurements, it is so easy to just sit by and say
"A system with 32 bit size_t could allocate more than 4GB
memory. A system like that COULD exist."
So WHAT?
I don't know "so WHAT". You see the problem here is
that you have not explained what your point is. In
addition to making the effort (actually not that much
effort it seems to me) of making the measurements, it
would have been very nice if you had explained what point
the measurements are meant to illustrate/investigate.
I'll take a guess: your point is that calloc should check
whether the multiplication (if that's what it does) yields
a value so big that the system cannot possibly have that
much memory. Perhaps it should , or perhaps the programmer
should , it seems like a matter of taste to me and I won't
enter into an endless argument about it. But the main problem
as I pointed out in a previous post is that your experiments
even done on a 32 bit system (whatever that means) don't
tell us for sure what checks the calloc implementations on
those systems do. As I said you would need to check the code
of calloc to verify that.
Can you please tell me where that system is????
If not, just do not participate. Thanks for your
correction. A system where this test gives a false
positive COULD exist. It is conceivable.
You cannot set arbitrary rules about when people
cannot participate in the threads you start. If your
point in the above paragraph (see ? I have to *guess*
again what your point is because you don't spell it out)
is that people should only participate if they're going
to address your main point in the thread, then I can kind
of see this as a reasonable requirement but you need to
explain first what your point is and you haven't done that.