From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28914 invoked by alias); 13 Oct 2004 18:49:24 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 28895 invoked from network); 13 Oct 2004 18:49:23 -0000 Received: from unknown (HELO web8505.mail.in.yahoo.com) (202.43.219.167) by sourceware.org with SMTP; 13 Oct 2004 18:49:23 -0000 Message-ID: <20041013180434.88918.qmail@web8505.mail.in.yahoo.com> Received: from [198.24.6.134] by web8505.mail.in.yahoo.com via HTTP; Wed, 13 Oct 2004 19:04:34 BST Date: Wed, 13 Oct 2004 18:49:00 -0000 From: Vinay Subject: Re: (Question reframed)Storing specified variables in the same memory page! To: gcc-help@gcc.gnu.org In-Reply-To: <20041013085119.5721.qmail@web40508.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2004-10/txt/msg00095.txt.bz2 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 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