On 04/07/2016 13:18, Markus Armbruster wrote: > Paolo Bonzini <[email protected]> writes: > >> On 30/06/2016 16:12, Markus Armbruster wrote: >>> Implementing a stack as "big enough" array can be wasteful. >>> Implementing it as dynamically allocated list is differently wasteful. >>> Saving several mallocs and frees can be worth "wasting" a few pages of >>> memory for a short time. >> >> Most usage of QmpInputVisitor at startup comes from >> object_property_set_qobject, which only sets small scalar objects. The >> stack is entirely unused in this case. > > A quick test run shows ~300 qmp_input_visitor_new() calls during > startup, with at most two alive at the same time. > > Why would it matter whether these are in the order of 150 bytes or 25000 > bytes each? How could this materially impact RSS?
I think we agree that it doesn't. The question in the subthread is whether we can improve QmpInputVisitor in general. Paolo
