[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: Rong-En Fan
Subject: Re: ncurses: tgetent leaks nearly 10 KB of memory every time it is called
Date: Sun, 18 Jun 2006 06:53:59 +0800
User-agent: Mutt/1.5.11

On Sat, Jun 17, 2006 at 03:27:42PM -0700, Matt wrote:
> [adding the devel/ncurses port maintainer to the conversation]
> On Thu, Jun 15, 2006 at 07:43:22PM -0400, Thomas Dickey wrote:
> > On Thu, 15 Jun 2006, Matt wrote:
> > >So, since it's such a pain to upgrade ncurses on FreeBSD (they have
> > >FreeBSD-specific hacks that I don't want to dig into), I'm hacking
> > >a simple tgetent cache into my copy of GNU screen, since those
> > >tgetent calls are just getting the same answer every time. I suspect
> > >it will be at least a year before the FreeBSD folks make a new
> > >release that incorporates ncurses 5.5; until then this hack will
> > >get me by.
> > >
> > >I tried installing the FreeBSD port of ncurses 5.5 and linking GNU
> > >screen with that, but it doesn't work right -- it needs the
> > >FreeBSD-specific hacks that have been made to the ncurses build
> > >that the base system uses. It sure would be nice if those hacks
> > 
> > I pointed out to someone working on the ncurses port recently that most 
> > (if not all) of it can be done simply by using ncurses' configure script
> > options
> > 
> >          --enable-termcap \
> >          --disable-database \
> >          --enable-getcap
> > 
> > That was enough for the port, which I see here is the same as the base 
> > system:
> > 
> > http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/lib/libncurses/termcap.c?rev=
> Ah, cool, thanks Thomas. That helped. Starting with this hint, I
> carefully compared the ncurses_cfg.h created by the devel/ncurses
> port's configure script with the one in the FreeBSD base system:
> http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/lib/libncurses/ncurses_cfg.h?rev=1.5&content-type=text/plain
> and I found a few more configure options that I believe bring it
> very close to the FreeBSD base. I think the key ones are:
> --enable-termcap
> --disable-database
> --enable-getcap
> --enable-colorfgbg
> --enable-bsdpad
> --disable-home-terminfo
> So I ended up with:
> CONFIGURE_ARGS= --datadir=${PREFIX}/share/misc --disable-overwrite \
>                 --enable-termcap --includedir=${PREFIX}/include/ncurses \
>                 --with-profile --with-shared --without-debug \
>                 --without-curses-h --with-termlib --program-prefix= \
>                 --enable-safe-sprintf --disable-root-environ \
>                 --with-manpage-format=gzip --srcdir=../ \
>                 --disable-database --enable-getcap --enable-colorfgbg \
>                 --enable-bsdpad --disable-home-terminfo
> Would it make sense to change the port defaults to be more BSD-like?
> Actually, I'm more interested in updating the FreeBSD base ncurses...

Please read http://www.rafan.org/FreeBSD/ncurses/

I have posted this on both -current@ and -stable@ one or two weeks
ago. And I'm working on a new building framework for ncurses
(almost done). I will post a status update next week. 
I hope you can also help to test things on that page.

As for the port, it's already on my list (see the url above).
I would like to send out the status update first then deal with 
the port (should be the next few days).

Rong-En Fan

reply via email to

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