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: (Question reframed)Storing specified variables in the same memory page!


Hello all,

Thank you very much for all your replies. But the
project requirements are different. The problem is as
follows.

A main program shall be running. An user source
program is given as input to the main program. Along
with the source program, some variables present in the
source program shall also be specified. From the main
program, I need to inform the compiler to allocate
successive memory locations for these variables so
that they reside on the same memory page. 

The main program is not allowed to change the type of
the variables.

Please give suggestions.

Thanks,
Vinay
--- energon <energon0@yahoo.com> wrote: 
> 
> Well, you can define a struct with the necessary
> variable types and
> allocate some shared memory and map the struct into
> the shared memory.
> 
> Typically, shared memory is allocated in size of
> page size chunks.
> So, if your data set size does not span the memory
> page size, you'll
> have your data in one page.
> 
> Do you need to avoid your data from being paged out
> of the RAM?
> 
> 
> =====
> -energon0
> 
> 
> 		
> _______________________________
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
>  

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony


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