English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
How to do this properly with OCaml?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-07-23 (23:27)
From: Stephane Glondu <Stephane.Glondu@c...>
Subject: Re: [Caml-list] How to do this properly with OCaml?
On Saturday 23 July 2005 12:59, Thomas Fischbacher wrote:
> I think that this will not work.
> If I duplicate entries to fill up holes, and later on remove a
> legitimate entry whose duplicates fill holes from the heap, I have to
> introduce extra bookkeeping so that the other placeholder copies of that
> entry are replaced as well - otherwise it could not be reclaimed by GC.

Oh, you are right, I didn't think about it... However, my first idea was to 
use always the same value to fill the holes (e.g. the first one given), so 
that you keep only this one allocated. Still, it won't be a good deal if 
your first value uses a lot of memory...

Stephane Glondu.