This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
placing datastructures in contiguous memory
- To: "'gcc-help at gcc dot gnu dot org'" <gcc-help at gcc dot gnu dot org>
- Subject: placing datastructures in contiguous memory
- From: Venkatesh Tanjore <VenkateshT at ishoni dot com>
- Date: Sat, 20 Oct 2001 14:35:10 +0530
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