public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sriharsha Vedurmudi <sriharsha.v@redpinesignals.com>
To: Vinay <vinaymr_02@yahoo.co.in>
Cc: gcc <gcc-help@gcc.gnu.org>
Subject: Re: (Question reframed)Storing specified variables in the same memory page!
Date: Thu, 14 Oct 2004 05:13:00 -0000	[thread overview]
Message-ID: <416E0CA7.4050309@redpinesignals.com> (raw)
In-Reply-To: <20041013180434.88918.qmail@web8505.mail.in.yahoo.com>

Hi Vinay,
    is your aim something like an intelligent program editor where-in 
you write a program and execute the 'compile' option in the editor. Here 
the editor picks up the source program and passes it on to the compiler 
for compilation. The extra functionality you need is that some of the 
variables that are explicitly specified should be allocated in 
contiguous/successive memory locations? Is it?

    Well, I am not aware of any such options for gcc atleast, but I feel 
that such things are to be taken care in the source program itself. 
Encapsulate them in a structure, as suggested earlier.

    Still I wonder why you would want them on a same memory page? Is it 
purely for speed optimization?

Regards,
Harsha.

Vinay wrote:

>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
>  
>

-- 
 *****************************
 * Sriharsha Vedurmudi			
 * Software Engineer		
 * 
 * Redpine Signals Inc.	
 * Gate #395, Plot 87,88			
 * Sagar Society, Road #2, 
 * Banjara Hills,		
 * Hyderabad - 500 034			
 * www.redpinesignals.com	
 *							
 * +91-40-23559911  (Office)
 * +91-9849133133   (Mobile)
 *****************************

  parent reply	other threads:[~2004-10-14  5:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-11 15:53 Storing " Vinay
2004-10-11 15:57 ` Sriharsha Vedurmudi
2004-10-11 16:08   ` Vinay
2004-10-13  8:51     ` energon
2004-10-13 18:49       ` (Question reframed)Storing " Vinay
2004-10-13 18:59         ` Eljay Love-Jensen
2004-10-14  5:13         ` Sriharsha Vedurmudi [this message]
2004-10-15 13:29           ` energon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=416E0CA7.4050309@redpinesignals.com \
    --to=sriharsha.v@redpinesignals.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=vinaymr_02@yahoo.co.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).