Re: [PATCH 02/40] Eliminate make_cleanup_obstack_free, introduce auto_obstack

Yao Qi
2017-06-26T13:47:43Z

Pedro Alves <palves@redhat.com> writes:

[I am not sure how many patches in the series I can review, so I may
stop at any point.]

> These changes in the parsers may not be obvious:
>
> - obstack_init (&name_obstack);
> - make_cleanup_obstack_free (&name_obstack);
> + name_obstack.clear ();
>
> Here, the 'name_obstack' variable is a global. The change means that
> the obstack's contents from a previous parse will stay around until
> the next parsing starts. I.e., memory won't be reclaimed until them.
> I don't think that's a problem, these objects don't really grow much
> at all.

I don't have a better solution to this, so I have to say that your patch
is good enough. Patch is good to me.

--
Yao (齐尧)