Re: Garbage collection

Antti-Juhani Kaijanaho <antti-juhani@kaijanaho.info>
15 Aug 2004 22:16:23 -0400

          From comp.compilers

Related articles
[5 earlier articles]
Re: Garbage collection basile-news@starynkevitch.net (Basile Starynkevitch \[news\]) (2004-08-05)
Re: Garbage collection nick.roberts@acm.org (Nick Roberts) (2004-08-09)
Re: Garbage collection vbdis@aol.com (2004-08-10)
Re: Garbage collection gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-08-11)
Re: Garbage collection nick.roberts@acm.org (Nick Roberts) (2004-08-13)
Re: Garbage collection t.zielonka@zodiac.mimuw.edu.pl (Tomasz Zielonka) (2004-08-13)
Re: Garbage collection antti-juhani@kaijanaho.info (Antti-Juhani Kaijanaho) (2004-08-15)
Re: Garbage collection gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-08-15)
Re: Garbage collection nick.roberts@acm.org (Nick Roberts) (2004-08-23)
Re: Garbage collection sk@z.pl (Sebastian) (2004-08-23)
Re: Garbage collection sk@z.pl (Sebastian) (2004-08-23)
Re: Garbage collection nick.roberts@acm.org (Nick Roberts) (2004-09-03)
Re: Garbage collection sk@bez.spamu.z.pl (Sebastian) (2004-09-07)
[7 later articles]
| List of all articles for this month |

From: Antti-Juhani Kaijanaho <antti-juhani@kaijanaho.info>
Newsgroups: comp.compilers
Followup-To: comp.programming
Date: 15 Aug 2004 22:16:23 -0400
Organization: The orthoplex community
References: 04-08-032 04-08-054 04-08-071 04-08-081
Keywords: architecture, comment

Nick Roberts <nick.roberts@acm.org> kirjoitti 13.08.2004:
> On 11 Aug 2004 12:58:25 -0400, glen herrmannsfeldt <gah@ugcs.caltech.edu>
> wrote:
>> As I understand it, it is common on many systems for the memory
>> allocation system to fill page tables with pointers to one zero
>> filled page, and then allocate a real page with the first write
>> operation.
>
> I don't understand why it is necessary for the PTEs to be set to
> point to any frame. Why not just set the P bit to 0?


Presumably because when the P bit is 0, even reading the page triggers a
page fault; if all zero-filled allocated pages are physically shared,
read operations do not trigger a page fault, and only when a write
operation is attempted is the operating system called.


I'm not sure how useful that is; presumably most pages are allocated in
order to write to them, not in order to read zeros from them.


I am also unsure how this relates to compilers any more :)
--
Antti-Juhani Kaijanaho http://antti-juhani.kaijanaho.info/
[There still seems to be a fair amount of C code that likes to dereference
random pointers and expects to find zeros, but I agree that this has
wandered away from compilers. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.