This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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 (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]