delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/26/05:09:06

Date: Thu, 26 Mar 1998 13:07:35 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Anton Helm <tony AT nt DOT tuwien DOT ac DOT at>
cc: djgpp AT delorie DOT com
Subject: Re: flex never frees some buffers !?
In-Reply-To: <3.0.5.32.19980326093933.00a57c10@hal.nt.tuwien.ac.at>
Message-ID: <Pine.SUN.3.91.980326130521.835B-100000@is>
MIME-Version: 1.0

On Thu, 26 Mar 1998, Anton Helm wrote:

> The yy_delete_buffer works fine for additionally aquired buffers
> (e.g. if you parse included files, like *.h in C) but NOT for the
> initial buffer because you are still inside flex when you detect
> an EOF and obviously must leave yylex() before freeing memory.

But your problem was, as I recall it, that Flex was using up 16K
*per buffer*.  yy_delete_buffer should be the solution for n-1 buffers 
out of n, at the least.  Surely, any modern machine can afford allocating 
16KB, no?

> What I don't understand is, why doesn't flex itself free the memory ?

I don't know.  I suggest posting a question to gnu.utils.bug.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019