[PATCH] Removal of uses of MAX_REGISTER_SIZE

Joel Brobecker brobecker@adacore.com
Thu Feb 2 09:40:00 GMT 2017


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



More information about the Gdb-patches mailing list