Date: Thu, 26 Mar 1998 13:07:35 +0300 (IDT) From: Eli Zaretskii To: Anton Helm 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.