Message-Id: <3.0.5.32.19980325165901.00a30100@dictator.nt.tuwien.ac.at> Date: Wed, 25 Mar 1998 16:59:01 +0100 To: djgpp AT delorie DOT com From: Anton Helm Subject: Re: flex never frees some buffers !? In-Reply-To: <199803250554.VAA20210@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Precedence: bulk At 21:54 24.03.98 -0800, you wrote: >>I've just discovered that flex (flex254b) never frees the 2 following >>buffers: >> - yy_current_buffer->yy_ch_buf (size: approx. 16 kbytes) >> - yy_current_buffer (size: 40 bytes) >> >I suspect there is a reason for not freeing these (perhaps flex expects to >have to use them later?? I haven't investigated) This behaviour is quite annoying, especially if you use lots of (different) flex lexical analysers in the same program, each consuming 16k. Some colleages reported that they tried to free the memory manually which resulted in a system crash... (I haven't done this myself, so I cannot give details.) Anyone out there who knows why this memory is kept until program terminates ? and how to get rid of the allocated memory during runtime ? Tony ************************************************************** Dipl.-Ing. Anton HELM *T* mailto:tony AT nt DOT tuwien DOT ac DOT at Institut fuer *U* http://www.nt.tuwien.ac.at/~tony/ Nachrichtentechnik und *W* http://www.nt.tuwien.ac.at/ Hochfrequenztechnik *I* talkto:tony AT eagle DOT nt DOT tuwien DOT ac DOT at Guszhausstr. 25/389 *E* phoneto:+43-1-58801-3520 A-1040 Wien, AUSTRIA *N* faxto:+43-1-5870583 **************************************************************