From: skb AT xmission DOT removethis DOT com (Scott Brown) Newsgroups: comp.os.msdos.djgpp Subject: Re: Question: allocation Date: Tue, 22 Jun 1999 19:58:06 GMT Organization: (none) Lines: 33 Message-ID: <376fe84d.1001669722@news.xmission.com> References: <7km7cs$sc$1 AT nslave1 DOT tin DOT it> NNTP-Posting-Host: slc422.modem.xmission.com X-Trace: news.xmission.com 930081121 22717 166.70.2.168 (22 Jun 1999 19:52:01 GMT) X-Complaints-To: abuse AT xmission DOT com NNTP-Posting-Date: 22 Jun 1999 19:52:01 GMT X-Newsreader: Forte Free Agent 1.11/32.235 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Mon, 21 Jun 1999 22:29:20 +0200, "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)? >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?