From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA27088; Fri, 24 May 2002 13:36:10 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA27116 for ; Fri, 24 May 2002 13:36:09 +0200 (MET DST) Received: from audi.ibcp.fr (audi.ibcp.fr [193.51.160.127]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g4OBa9f13426 for ; Fri, 24 May 2002 13:36:09 +0200 (MET DST) Received: from pc-bioinfo3.ibcp.fr (pc-bioinfo3.ibcp.fr [193.51.160.176]) by audi.ibcp.fr (Postfix) with ESMTP id BCC95FCD9; Fri, 24 May 2002 13:36:08 +0200 (CEST) Message-Id: <5.1.0.14.0.20020524131856.009fb360@mail.ibcp.fr> X-Sender: jambon@mail.ibcp.fr X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Fri, 24 May 2002 13:36:08 +0200 To: francois bereux From: Martin Jambon Subject: Re: [Caml-list] Garbage collector and memory fragmentation Cc: caml-list@inria.fr In-Reply-To: <20020524102257.GA17643@kiefer.ai.univie.ac.at> References: <3CEDEA7C.D2C9B8D6@fr.thalesgroup.com> <3CEDEA7C.D2C9B8D6@fr.thalesgroup.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk At 12:22 24/05/02 +0200, Markus Mottl wrote: >On Fri, 24 May 2002, francois bereux wrote: > > My question is : does a garbage collector (for instance the one in > > OCaml) deal with this kind of issues ( defragmentation of the memory ) > > in a situation similar to mine : many small lists of elements ? > >The GC employed by OCaml is able to compact the heap, which means >it essentially defragments memory. You can parameterize it with the >frequency of such compactions (they are very expensive), turn them off >completely or force them manually. Take a look at the interface of the >Gc-module in the distribution for more details. Il y a 2 options : - compaction automatique d=E8s que l'espace de m=E9moire inutilis=E9= d=E9passe x=20 % (en utilisant Gc.set et en sp=E9cifiant le champ max_overhead : Gc.set {= =20 (Gc.get ()) with Gc.max_overhead =3D 200 };;) - compaction explicite par appel =E0 Gc.compact de temps en temps. La premi=E8re solution est la plus =E9l=E9gante, mais il y a un bug (cf. bug= =20 report numero 1111) qui appara=EEt dans certains cas de figure non=20 d=E9termin=E9s. Je tenais juste =E0 vous l'indiquer au cas o=F9 vous= tomberiez=20 dessus... Martin ------------------- 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