Mail Archives: djgpp/1999/06/22/16:26:42
On Mon, 21 Jun 1999 22:29:20 +0200, "Marco Fabiani" <fabisoft AT tin DOT it>
wrote:
>I've a little question:
>
>i'f i declare:
>
>int a[10];
>int b[10];
>
>int main()
>{
>int c[10];
>int d[10];
>
> /* ecc.ecc. */
> return 0;
>}
>
>where a, b, c, d goes?
>c and d should go on stack, that in Intel-based machines means c > d (c is
>allocated at an upper address than d), but a and b?? Does djgpp use a data
>segment for global variables (thus b > a) or system stack (thus a > b)?
>And, is it safe to assume that a and b are allocated consecutively in
>memory?
In regard to standard C, I don't believe that you can successfully
predict anything about the locations or underlying data structures for
your four objects. You should post this question over in comp.lang.c
to get a more complete answer.
Or were you asking about DJGPP in particular?
- Raw text -