public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* placing datastructures in contiguous memory
@ 2001-10-21 23:10 Venkatesh Tanjore
  0 siblings, 0 replies; 2+ messages in thread
From: Venkatesh Tanjore @ 2001-10-21 23:10 UTC (permalink / raw)
  To: 'gcc@gcc.gnu.org'

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: placing datastructures in contiguous memory
@ 2001-10-22  0:51 mike stump
  0 siblings, 0 replies; 2+ messages in thread
From: mike stump @ 2001-10-22  0:51 UTC (permalink / raw)
  To: VenkateshT, gcc

> From: Venkatesh Tanjore <VenkateshT@ishoni.com>
> To: "'gcc@gcc.gnu.org'" <gcc@gcc.gnu.org>
> 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 

Sure.  Lookup the word attribute and then the word section in the FM.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-22  0:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-21 23:10 placing datastructures in contiguous memory Venkatesh Tanjore
2001-10-22  0:51 mike stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).