linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "William N. Zanatta" <william@veritel.com.br>
To: "'linux-c-programming@vger.kernel.org'"
	<linux-c-programming@vger.kernel.org>
Subject: GCC and Memory Organization
Date: Tue, 09 Apr 2002 12:07:08 -0300	[thread overview]
Message-ID: <3CB3039C.4070404@veritel.com.br> (raw)

Hello brothers,

   I have a question on memory organization...
   In my Computer Architeture classes, I've learned something like that 
there are two ways to organize data in memory.
   The first one puts it in a linear mode like:

      +---------------+
12k  | z | z |   |   |
      |---------------|
8k   | y | y | z | z |
      |---------------|
4k   | x | x | x | y |
      +---------------+

   And the second way is a non-linear, a block mode like:

      +---------------+
12k  | z | z | z | z |
      |---------------|
8k   | y | y | y |   |
      |---------------|
4k   | x | x |   |   |
      +---------------+

   The second way should be faster than the first one for memory 
management, right?! That a kindda obviuos as it wouldn't be necessary to 
scan all the block to find the next entry. Also it can be expensive 
since the 4k block is allocated for only 2k of real data.

   My question is, how does GCC works with this? Does it have any switch 
for optimizing (or not) the code?? What's the default action???

   Thank you, keep it hard!

William Zanatta


             reply	other threads:[~2002-04-09 15:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-09 15:07 William N. Zanatta [this message]
2002-04-09 22:12 ` GCC and Memory Organization Glynn Clements
2002-04-11 12:48   ` William N. Zanatta
2002-04-11 13:22   ` William N. Zanatta
2002-04-11 14:07     ` Glynn Clements

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=3CB3039C.4070404@veritel.com.br \
    --to=william@veritel.com.br \
    --cc=linux-c-programming@vger.kernel.org \
    /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 NNTP newsgroup(s).