[Top][All Lists]

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

Re: ncurses: tgetent leaks nearly 10 KB of memory every time it is calle

From: Thomas Dickey
Subject: Re: ncurses: tgetent leaks nearly 10 KB of memory every time it is called
Date: Thu, 15 Jun 2006 18:30:50 -0400 (EDT)

On Thu, 15 Jun 2006, Matt wrote:

Dear GNU ncurses maintainers,

Sorry about the scary subject -- that's only a true statement for
the old version of ncurses (5.2-20020615) that the latest version
of FreeBSD (6.1) still uses for their standard curses library.
I think you've fixed that enormous leak already.

I might have. There's a known leak of the terminal data due to a knot in the way "use=" clauses are combined. I don't recall checking for repeated calls on tgetent(), though.

However, in ncurses 5.5 there still seems to be a very slow leak
in tgetent. I mentioned that in the bug report I filed to FreeBSD:

That's probably the fixup for sgr0 (makes a copy of it to translate into
termcap). I might be able to improve that (I seem to recall noticing there was still a leak in it).

I clock it leaking 4 KB for every 200 calls to tgetent, or about
20 bytes per call. Sorry, I don't have any more time to investigate
it, but I figured I should drop you a note. If you write a little
program that calls tgetent(NULL, "vt100") repeatedly you should
be able to confirm or deny my observation.

curious - what sort of application (other than for testing) makes repeated calls to tgetent() for the same $TERM ?

Thomas E. Dickey

reply via email to

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