[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory leak in bison 1.35

From: Ignasi Villagrasa
Subject: Re: Memory leak in bison 1.35
Date: Tue, 27 Aug 2002 15:02:45 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1

Thanks for answering at first, Tim.

Yes. I use flex also.

I've built the corresponding files for bison and flex, and have an application that runs yyparse many times, using the corresponding rules.

In fact, the application runs sql sentences continously. I notice that memory leak is growing continuosly every time yyparse is called. It seems to grow in 4Kb chunks. I've only tested it using Windows task administrator, without any other checker, but it always fails when calling yyparse. If I comment this function, the memory leak dissapears. Obviously I don't have the desired program behaviour, but I can isolate the problem.

Does flex allocate a buffer every time yyparse is called, or it does only the first time ?

Thanks in advance, Ignasi Villagrasa.

Tim Van Holder wrote:

On Tue, 2002-08-27 at 12:34, Ignasi Villagrasa wrote:

Hi everyone,

I'm using bison version 1.35 that comes with cygwin package for Windows enviroments.

I detect a memory leak in generated C code. Function yyparse loses periodically 4K chunks memory.

Because of the unclear generated code, I'd like to know if there's a known solution for this problem before getting into the source code.

Are you also using flex?
At startup, flex allocates a buffer that is never freed; it's not really
a memory leak (flex merely has no point at which it can free the buffer
normally, so it relies on the normal 'at end' cleanup), but will be
reported as such by many memory checkers.
It allocates chunks of 16k tho, not 4k.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]