https://bugs.kde.org/show_bug.cgi?id=371916
--- Comment #20 from Philippe Waroquiers <philippe.waroqui...@skynet.be> --- (In reply to Josef Weidendorfer from comment #17) > I just wondered if the xtree API could work without having to pass > add/sub_data_fn handlers to make it simpler. I see that the add > handler is used for calculating the totals in the callgrind output. > What about "reduce" instead of "add"? It's a reduction operation to > be used for propagating the value up the call chains. Yes, any kind of operation can in fact be done by add (or sub) functions, and so they effectively play the role of Reduce functions. For the moment, I have however kept the current add/sub approach, as at least currenly it is assumed the module will be mostly used to track consumption of some resources, which I think is more clearly modelled with add/sub. I have added some comments to explain that these add/sub have no specific constraints and so are equivalent to Reduce functions. The interface might be changed if we see many uses where a Reduce based terminology is more appropriate. Regarding comment 15 "(Perhaps separate the memory allocation stuff into different file)" : I have now separated this from xtree, in pub_tool_xtmemory.h/m_xtmemory.c. -- You are receiving this mail because: You are watching all bug changes.