[Q] Flex/Bison memory deallocation

pivetta@polly.cenatls.cena.dgac.fr (David PIVETTA)
Mon, 4 Sep 1995 16:29:41 GMT

          From comp.compilers

Related articles
[Q] Flex/Bison memory deallocation pivetta@polly.cenatls.cena.dgac.fr (1995-09-04)
| List of all articles for this month |

Newsgroups: comp.compilers
From: pivetta@polly.cenatls.cena.dgac.fr (David PIVETTA)
Keywords: flex, yacc, storage, question
Organization: Centre d'Etudes de la Navigation Aerienne
Date: Mon, 4 Sep 1995 16:29:41 GMT

Hello !


I'm using Flex and Bison for Ada types analysis. I wonder if
either Flex or Bison generated analysor do not release memory
space. Do you know if it could be so ?


In fact, I have realized that my process size increases each time
grammatical parser is called. The ratio from process size growing to
ascii input file size is about 20 !


I know others applications, such as code generation, using Flex and
Bison, where only one input file is parsed at a time : process size
growing is not a problem, as life time of this process
and input files size are small ; which is not the case in my
application.


Any help (document, experience or pointer) appreciated.
Thanks.


David Pivetta
[Flex is pretty careful about reusing its malloc'ed space, and bison the last
time I looked didn't malloc at all. But if you all malloc() in your semantic
routines, it's very easy to lose the space you've allocated unless you're
extremely careful or else automatically chain together and free all the space
you allocate. -John]


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.