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] Removal of uses of MAX_REGISTER_SIZE


> #2 - Switch to heap allocation
> 
> Or std::vector or something like that that hides it.  It's not clear
> whether that would have a noticeable performance impact.

I would try that. I think using one of the standard C++ classes
looks a little more attractive to me, and would only consider
the lambda functions if we can show a noticeable performance
impact. Those two are not exclusive, by the way, but in the past,
we've always frowned on calls to alloca in a loop, and using
a xmalloc+cleanup combination has never been an issue in my cases.
I'd imagine that a standard C++ memory management class would be
fast enough for those same situations.

-- 
Joel


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