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
[Caml-list] Q: automatic forgetting cache, module Weak, Gc control
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-07-02 (08:54)
From: Hendrik Tews <tews@t...>
Subject: Re: [Caml-list] Re: Q: automatic forgetting cache, module Weak, Gc control
Jan Kybic <kybic@fel.cvut.cz> writes:

   I think the right idea is to insert each cached values into two
   structures: a weak hashtable so that the value can be found fast, and 
   another global FIFO type structure that will start to drop oldest values when
   there is not enough memory. For efficiency, the FIFO structure will 
   hold blocks (arrays). As the FIFO structure is global and will have to
   hold different types of data, storing Obj.t seems to be apropriate.
Why don't you use a variant type?



To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners