https://bugs.kde.org/show_bug.cgi?id=371916

Ivo Raisr <iv...@ivosh.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iv...@ivosh.net

--- Comment #3 from Ivo Raisr <iv...@ivosh.net> ---
Thank you for this patch, Philippe.
I was concentrating on the interface pub_tool_xtree.h in the first run and here
are my questions and comments:

1. void*(*alloc_fn)(const HChar*, SizeT) in VG_(newXT)().
What is 'const HChar *' used for? I can imagine 'SizeT' is for the size.
Perhaps if you can name the arguments, it would be clearer? Or you can give a
hint that VG_(malloc)() and VG_(free)() are typically used for alloc_fn and
free_fn?

2. What is 'ec' and 'IP' as referred to in VG_(newXT)()'? It is not explained
in the file header.

3. What is argument 'cc' used for in VG_(newXT)()?

4. Functions in this header file use a mixture of camelCase and all_lower_case
which is inconsistent and  disturbs reader's eyes. Can you do something with
it?

5. I wonder why VG_(init_XtAllocs)(), VG_(add_XtAllocs)(), VG_(sub_XtAllocs)()
and VG_(img_XtAllocs)() do not use structure XtAllocs instead of 'void *'? Am I
missing something?

6. XtAllocsEvents does not need to be exported.

7. For VG_(XtMemoryFull_free)(), does providing ec_alloc brings an unnecessary
burden on the tool? Perhaps m_xtree.c could cache it?

8. VG_(XtMemory_report)() talks about xtree-memory=full, --xtree-memory=allocs
and --xtree-memory=none. How one does set these? 

9. "typedef void MsFile;" Surely we can do better with implementation hiding.
Several lines above "typedef struct _XTree  XTree;" was used, so what about:
    typedef struct _MsFile MsFile;

10. I also wonder why callgrind and massif specific functionality is contained
in generic module xtree? Perhaps it could be located in the tools themselves?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to