Re: Reclaiming dynamic memory if parse fails?

Martin Ward <martin@gkc.org.uk>
Mon, 16 Jul 2007 10:05:29 +0100

          From comp.compilers

Related articles
Reclaiming dynamic memory if parse fails? carsonbj@gmail.com (carsonbj@gmail.com) (2007-07-13)
Re: Reclaiming dynamic memory if parse fails? chris.dollin@hp.com (Chris Dollin) (2007-07-16)
Re: Reclaiming dynamic memory if parse fails? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-07-16)
Re: Reclaiming dynamic memory if parse fails? kenshin_40@htomail.com (Mark Holland) (2007-07-16)
Re: Reclaiming dynamic memory if parse fails? martin@gkc.org.uk (Martin Ward) (2007-07-16)
Re: Reclaiming dynamic memory if parse fails? blume@hanabi.local (Matthias Blume) (2007-07-18)
| List of all articles for this month |

From: Martin Ward <martin@gkc.org.uk>
Newsgroups: comp.compilers
Date: Mon, 16 Jul 2007 10:05:29 +0100
Organization: Compilers Central
References: 07-07-051
Keywords: parse, errors, storage
Posted-Date: 18 Jul 2007 20:03:14 EDT

On Friday 13 Jul 2007 15:50, carsonbj@gmail.com wrote:
> When a parse fails, in the middle of the
> configuration file, and the tree is partially built, how can I reclaim
> all of the dynamic memory gracefully?


John replied:
> [There's no really clean way to do it. ...


Using a C garbage collector is probably the cleanest way to do it,
eg the Boehm-Demers-Weiser conservative garbage collector:


http://www.hpl.hp.com/personal/Hans_Boehm/gc/


--
Martin


martin@gkc.org.uk http://www.cse.dmu.ac.uk/~mward/ Erdos number: 4
G.K.Chesterton web site: http://www.cse.dmu.ac.uk/~mward/gkc/


Post a followup to this message

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