Re: memory leak in yacc

steve@cegelecproj.co.uk (Steve_Kilbane)
Thu, 15 Sep 1994 09:19:47 GMT

          From comp.compilers

Related articles
memory leak in yacc etse@scdt.intel.com (1994-09-14)
Re: memory leak in yacc steve@cegelecproj.co.uk (1994-09-15)
Re: memory leak in yacc schinz@guano.alphanet.ch (1994-09-18)
Re: Memory leak in YACC Edward_Finch@intersolv.com (1994-09-21)
| List of all articles for this month |

Newsgroups: comp.compilers
From: steve@cegelecproj.co.uk (Steve_Kilbane)
Keywords: yacc
Organization: Compilers Central
References: 94-09-044
Date: Thu, 15 Sep 1994 09:19:47 GMT

The moderator writes:
> [I sometimes write my own wrapper for malloc that chains together all of
> the memory allocated using it, so then I can free it all at a point where I
> know that none of it's in use any more. -John]


This certainly seems the best method to me. If yacc finds a syntax error,
it's likely to leave you with an incomplete tree of malloc'd areas, and
no way of freeing them. There are probably ways, but I just found it
simpler to free everything allocated at once.


steve
--
<Steve_Kilbane@cegelecproj.co.uk>
--


Post a followup to this message

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