bug-gnulib
[Top][All Lists]
Advanced

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

Re: reclaiming memory before exit


From: Paul Smith
Subject: Re: reclaiming memory before exit
Date: Sat, 16 May 2020 01:57:37 -0400

On Sat, 2020-05-16 at 01:03 +0200, Bruno Haible wrote:
> Well, my experience is different. Last month, I analyzed a program
> that uses GNU libtextstyle, and the valgrind "leak" reports could be
> categorized into three groups:
>   * 1056 + 296 + 56 bytes, allocated through cr_style_init_properties
>     (inside libcroco). This is a statically allocated hash table with
>     a fixed number of entries. It can be ignored.
>   * Allocations inside libcurses. Discussed in this thread: [2].
>   * A real leak, which I fixed. [3]

Interesting.  I have run valgrind many times on GNU make, which uses a
lot of allocated memory which is referred to by global variables and is
not freed at exit, and I don't recall seeing these reported as leaks.

I will have to run again and refresh my memory as it's been some months
since I tried it last.

In any event, it seems to me to be a deficiency in the detection if it
reports allocated memory which is still referenced to by global
variables, or even static variables, as memory leaks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]