Re: the maximum memory size allowed in malloc
Chris Croughton <chris@keristor .net> writes:
[color=blue]
> On Wed, 26 Jan 2005 02:13:56 GMT, CBFalconer
> <cbfalconer@yah oo.com> wrote:
>[color=green]
>> The C90 standard guarantees that you can get at least one object 32
>> kBytes in size, and this may be static, dynamic, or automatic
>> memory. C99 guarantees at least 64 kBytes. For any higher limit,
>> see your system documentation, and the results are off-topic here.[/color]
>
> Where are those in the standard(s)? I had a long look and couldn't see
> them.[/color]
Here's what C99 says:
5.2.4.1 Translation limits
1 The implementation shall be able to translate and execute at least one program that
contains at least one instance of every one of the following limits:13)
....
- 65535 bytes in an object (in a hosted environment only)
[color=blue]
> Hmm, it seems that there can't be a compliant C99 implementation for
> small processors any more (and that seems like a totally artificial
> requirement, what in the standard requires objects of 64KB?).[/color]
The requirement applies only to hosted implementations .
--
"The way I see it, an intelligent person who disagrees with me is
probably the most important person I'll interact with on any given
day."
--Billy Chambless
Chris Croughton <chris@keristor .net> writes:
[color=blue]
> On Wed, 26 Jan 2005 02:13:56 GMT, CBFalconer
> <cbfalconer@yah oo.com> wrote:
>[color=green]
>> The C90 standard guarantees that you can get at least one object 32
>> kBytes in size, and this may be static, dynamic, or automatic
>> memory. C99 guarantees at least 64 kBytes. For any higher limit,
>> see your system documentation, and the results are off-topic here.[/color]
>
> Where are those in the standard(s)? I had a long look and couldn't see
> them.[/color]
Here's what C99 says:
5.2.4.1 Translation limits
1 The implementation shall be able to translate and execute at least one program that
contains at least one instance of every one of the following limits:13)
....
- 65535 bytes in an object (in a hosted environment only)
[color=blue]
> Hmm, it seems that there can't be a compliant C99 implementation for
> small processors any more (and that seems like a totally artificial
> requirement, what in the standard requires objects of 64KB?).[/color]
The requirement applies only to hosted implementations .
--
"The way I see it, an intelligent person who disagrees with me is
probably the most important person I'll interact with on any given
day."
--Billy Chambless
Comment