Mail Archives: djgpp/1999/06/21/22:39:13
Marco Fabiani 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)?
Data segment, conceptually.
> And, is it safe to assume that a and b are allocated consecutively in
> memory?
No.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -