On 11/27/2014 07:17 PM, Chet Ramey wrote:
> On 11/27/14 6:58 AM, Andreas Grapentin wrote:
>> Hello,
>>
>> I am currently trying to verify that an application of mine does not
>> leak memory, and I noticed that the readline library does not free some
>> allocations below the rl_initialize function.
> This is not unexpected; there are data structures like keymaps that
> readline allocates once the first time it is called and expects to
> persist through all calls to readline() by a particular application.
> What does a memory allocation profiler like valgrind say about where
> the blocks were allocated and whether or not the library retains
> pointers to those blocks?
>
> Chet
>

Hi Chet,

valgrind will probably claim that these blocks are still reachable at
program exit, but that is beside the point. I am not claiming that
readline leaks memory, I claim that the unfreed allocations at exit
produce noise that makes it harder to find real memory leaks.

IMO, it would be nice to have a rl_finalize() function, that explicitly
releases the resources held by the library.

kind Regards,
Andreas

_______________________________________________
Bug-readline mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-readline

Reply via email to