This is the mail archive of the
mailing list for the GCC project.
placing datastructures in contiguous memory
- To: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Subject: placing datastructures in contiguous memory
- From: Venkatesh Tanjore <VenkateshT at ishoni dot com>
- Date: Mon, 22 Oct 2001 11:42:49 +0530
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
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
Any help would be greatly appreciated. Please let me know if this is not the
correct list for tehse kinda questions.