Re: [PATCH spice-server v2 00/23] Use GLib memory allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20 September 2017 at 20:54, Christophe de Dinechin
<cdupontd@xxxxxxxxxx> wrote:
>
>> On 20 Sep 2017, at 11:53, Frediano Ziglio <fziglio@xxxxxxxxxx> wrote:

>> There are many tools to instruments memory allocations and is not hard
>> to write one on your own. For instance knowing that objects file takes
>> precedence over libraries you can write a module defining malloc, or use
>> --wrap linker option or LD_PRELOAD.
>
> That works if you want to instrument all malloc calls. If you want to do
> something specific to spice, you can’t do that.

Valgrind, for one, can easily provide information on allocations by
calling function - both for leak checking (the "memcheck" tool) and
heap usage profiling (the "massif" tool).

There's apparently even a simple way to slip it under an existing QEMU
VM from libvirt; there is a recipe for that in this presentation:
https://www.linux-kvm.org/images/d/d2/03x07-Valgrind.pdf

Regards
Matthew Francis
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]