From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA14784 for caml-redistribution; Thu, 11 Mar 1999 13:34:34 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id BAA30715 for ; Thu, 11 Mar 1999 01:52:16 +0100 (MET) Received: from mail2.digital.com (mail2.digital.com [204.123.2.56]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id BAA05085 for ; Thu, 11 Mar 1999 01:52:14 +0100 (MET) From: doligez@pa.dec.com Received: from six.pa.dec.com (six.pa.dec.com [16.4.80.66]) by mail2.digital.com (8.9.2/8.9.2/WV2.0e) with SMTP id QAA02855 for ; Wed, 10 Mar 1999 16:52:13 -0800 (PST) Received: by six.pa.dec.com; id AA21421; Wed, 10 Mar 1999 16:52:13 -0800 Message-Id: <199903110052.AA21421@six.pa.dec.com> To: caml-list@inria.fr Subject: Re: controler la taille du tas In-Reply-To: Message of Wed, 10 Mar 1999 09:15:27 +0100 from "Pierre CREGUT - FT.BD/CNET/DTL/MSV" <19990310091527.17113@lsun605> Date: Wed, 10 Mar 1999 16:52:13 -0800 X-Mts: smtp Sender: weis >From: "Pierre CREGUT - FT.BD/CNET/DTL/MSV" >Y a t'il un moyen (même détourné) pour imposer que la taille du tas= > d'un >programme CAML ne passe jamais en dessous d'un certain seuil. >Je veux que même si la mémoire est inutilisée, le GC ne la relache = >pas >(sinon, une solution au problème est d'allouer un tableau global de la = >taille >du seuil voulu, mais ca n'a pas grand intérêt). C'est simple: 1. allouer un objet de la taille voulue (par exemple une chaine) 2. ne pas garder de pointeur sur cet objet 3. declencher un GC 4. ne pas utiliser le compactage >===[translation]=== > >Is there a way (even a weird one) to enforce that the size of the heap of= > >a Caml program will never shrink under a given threshold ? I want >that the garbage collector takes all the memory allocated and >does not release it even if it is unused. 1. allocate a big object (for example a string) 2. don't keep any pointer to the object 3. call the GC 4. don't use compaction -- Damien