bug-ncurses
[Top][All Lists]
Advanced

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

How does one use Valgrind with ncurses?


From: Steve Litt
Subject: How does one use Valgrind with ncurses?
Date: Tue, 27 Nov 2007 22:23:37 -0500
User-agent: KMail/1.9.4

Hi all,

I'm building a filepicker with ncurses and c (gcc), using Valgrind to find 
memory leaks. As mentioned here:

http://osdir.com/ml/lib.ncurses.bugs/2006-12/msg00043.html

initscr() allocates memory that isn't freed until after the program 
terminates. I'm finding leaks with memory allocated in initscr(), 
set_menu_mark(),  keypad(), new_menu(), mvwprintw(), and  new_item(), as well 
as code that I've written myself (I think). This same URL:

http://osdir.com/ml/lib.ncurses.bugs/2006-12/msg00043.html

says I can rebuild nCurses with ./configure --disable-leaks. Is there another 
way? I can't imagine what parts of my Linux distro (Mandriva 2007) depend on 
ncurses, and I'd rather not mess with the installed ncurses if I can avoid 
it.

If I rebuild ncurses with ./configure --disable-leaks, is there anything else 
I need to do in order to be guaranteed that any leaks found by Valgrind are 
not due to the ncurses libraries?

Thanks

SteveT

Steve Litt
Author: Universal Troubleshooting Process books and courseware
http://www.troubleshooters.com/




reply via email to

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