Hi Andrei,

No there is a bug in free_size.c (at least).
You didn't solve the conflict in addH.
my_malloc_hook loos fine. except you save the old hooks before the file
operations which looks quite comfortable.

Why not rewrite free_size.c with GLib's GHashTable?

Yu


On Sat, 2008-05-24 at 17:10 +0300, Andrei Soare wrote:
> Hello,
> 
> I need a little help with my work. I made some hooks into libc's
> malloc() and friends, following the tutorial from
> http://www.gnu.org/software/libtool/manual/libc/Hooks-for-Malloc.html
> and I tested them with gedit and pidgin.
> 
> From the output, some interesting lines caught my attention:
> 
> ...
> USED    0x810a430    1024
> USED    0x810aad8    6
> USED    0x810aae8    16
> USED    0x810ab00    6
> USED    0x810ab10    12
> FREE    0x810a2c8    352
> USED    0x810a2c8    352
> USED    0x810a430    1024
> ...
> (this was from gedit; notice the first and last lines)
> 
> ...
> USED    0x8131460    8
> USED    0x8131900    16
> USED    0x8131218    16
> FREE    0x8131218    16
> USED    0x8131430    8
> USED    0x8131df8    28
> USED    0x8131218    16
> USED    0x8131de8    8
> USED    0x8131460    8
> USED    0x8131460    8
> ...
> (this was from pidgin, also weird)
> 
> Here is my code: http://github.com/asoare/bprof/tree/master
> ( my_malloc_hook.c ). 
> In the above output, USED means malloc and FREE means, obviously,
> free.
> 
> I think there is a bug in my_malloc_hook.c, but i cannot find it. I
> would really appreciate it if you could give me a hint. 
> 
> Thank you.
> 
> -- 
> Andrei Soare 
> _______________________________________________
> gnome-love mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/gnome-love

_______________________________________________
gnome-love mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-love

Reply via email to