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


On 06/26/2017 02:47 PM, Yao Qi wrote:
> 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.]

Thanks.  I think patches #1 to #10 and #19 to #23 (inclusive), could
go in independently of the main completer and symbol lookup changes.

> 
>> 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.

Thanks, I've pushed this one in.

-- 
Pedro Alves


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