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
Right recursion with ocamlyacc
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-02-18 (15:27)
From: Radu Grigore <radugrigore@g...>
Subject: Re: [Caml-list] Right recursion with ocamlyacc
On Wed, 16 Feb 2005 11:18:21 +0200, Radu Grigore <radugrigore@gmail.com> wrote:
> In parsing.ml you will find a function approprately named growstacks.

And, BTW the stack size is doubled which is not a very good strategy.
With the simplest memory model (one contiguous segment) one can see
that if the array is allocated first at address 0 and then at the
lowest address that can hold it then the base address will keep
increasing. This assumes that there aren't other big data structures
in memory that get collected.

The same issue prompted a change in the implementation of STL in MSVC
7.0. IIRC the grow factor was reduced from 2 to 1.5. In theory to
allow reuse it is sufficient to use a factor less than the golden