[Top][All Lists]

[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:


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:


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 

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?



Steve Litt
Author: Universal Troubleshooting Process books and courseware

reply via email to

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