caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Stijn Devriendt <Stijn.Devriendt@wdc.com>
To: Frederic Perriot <fperriot@gmail.com>,
	"Perry E. Metzger" <perry@piermont.com>,
	Chet Murthy <murthy.chet@gmail.com>
Cc: caml-list <caml-list@inria.fr>
Subject: RE: [Caml-list] a bad value detector
Date: Fri, 11 May 2018 05:54:22 +0000	[thread overview]
Message-ID: <DM6PR04MB39321EAF27839CF4825EA3F3F69F0@DM6PR04MB3932.namprd04.prod.outlook.com> (raw)
In-Reply-To: <CAFY7FBPzzZvzmMWu1OWv8FNGFbAZ=iyrb8oz5g166u49GPxG2A@mail.gmail.com>

> -----Original Message-----
> From: caml-list-request@inria.fr [mailto:caml-list-request@inria.fr] On Behalf
> Of Frederic Perriot
> Sent: woensdag 9 mei 2018 10:40
> To: Perry E. Metzger <perry@piermont.com>; Chet Murthy
> <murthy.chet@gmail.com>
> Cc: caml-list <caml-list@inria.fr>
> Subject: Re: [Caml-list] a bad value detector
> 
> Perry E. Metzger  answered:
> > Once, I built a precise garbage collector for a language I'd
> > implemented in C. It was a simple Cheney collector with two
> > semispaces. I munmapped the unused semispace after each gc.
> > [...]
> 
> I only now realize your very trick is applicable to Ocaml's generational GC too:
> just alternate the young generation between two virtual address ranges.
> 

I've been thinking about a similar scheme, but for a different purpose.
Currently it is to be expected that some of the memory allocated last on the minor
heap is not long-lived. Yet it will still be moved to the major heap on minor GC.

A scheme with 2 minor heaps that alternate could give those allocations the
time they need to become stale, avoiding cluttering the major heap with all
expected beneficial side-effects.

Regards,
Stijn

> Then well-behaved programs should incur no page faults.
> 
> I'll give it a try, thanks.
> 
> Chet Murthy said:
> >If I remember correctly, a company once started with Boehm's conservative
> GC, and by doing things somewhat like you suggest, built a memory-leak-
> detector product.
> 
> Interesting.
> 
> thank you guys,
> regards,
> FP
> 
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

  reply	other threads:[~2018-05-11  5:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-02 16:19 Frederic Perriot
2018-05-04 20:48 ` Perry E. Metzger
2018-05-09  8:39   ` Frederic Perriot
2018-05-11  5:54     ` Stijn Devriendt [this message]
2018-05-12 10:54       ` Frederic Perriot
2018-05-05  3:26 ` Chet Murthy

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=DM6PR04MB39321EAF27839CF4825EA3F3F69F0@DM6PR04MB3932.namprd04.prod.outlook.com \
    --to=stijn.devriendt@wdc.com \
    --cc=caml-list@inria.fr \
    --cc=fperriot@gmail.com \
    --cc=murthy.chet@gmail.com \
    --cc=perry@piermont.com \
    /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).