This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: global variables not defined contiguously in memory


mikwilmot wrote:
> We are having a problem with defining global variables and having them
> allocated contiguously in memory.  There are two portions of two different
> files. In FILE 1 the variables are defined all over memory, in FILE 2 the
> variables are defined contiguously in memory.  Our application has certain
> reads that requires variables be defined one after another in memory.

Oh dear.  That's really bad.

If you want contiguous allocation, you'll have to put all
your global variables in a struct.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]