This is the mail archive of the gcc@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]

placing datastructures in contiguous memory


Hi

I would like to know if there is a way to ask the gcc to place all the  data
structures in a particular section of the memory continously 

To make it more clear , lets say I have 2 modules Module A and Module B.
Module A has the global data strcuture gDataStuctA and Module B has the
global data struct gDataStaructB. Bot these data strcutures are acccesed in
the critical path of the code. So I want them to be in continous memory so
that they remain in the data cache and dont thrash each other. If I place
them in contiguous memory locations , they would generally not thrash each
other.

So is there a #pragma or something which I can use to place the data
structure in a particular section of memory. This  way I can use the same
#pragma in all the modules and have the data structures in contiguous memory
locations..

Any help would be greatly appreciated. Please let me know if this is not the
correct list for tehse kinda questions.

thanks
venkatesh



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