NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/50092: huge memory leaks in vi(1) when changing screen size
The following reply was made to PR bin/50092; it has been noted by GNATS.
From: Rin Okuyama <okuyama%flex.phys.tohoku.ac.jp@localhost>
To: Julian Coleman <jdc%coris.org.uk@localhost>, gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: bin/50092: huge memory leaks in vi(1) when changing screen size
Date: Tue, 28 Jul 2015 00:10:55 +0900
Thank you for your comment.
> If we resize many times, we probably only care about the final size. So,
> we really could ignore any apart from the last resize. However, if we're
> already processing a resize, we should finish processing so that everthing
> is consistent (i.e. not interrupt the current resize).
Exactly.
> I wonder if we can just save the new size when we're already processing and
> check at the end of the current processing if a new (and different) size is
> saved? Then we would re-run the resize with the new saved size.
I think that your suggestion is a right way to deal with the problem.
Theoretically, we can do so by switching signal handlers appropriately.
Let me think for a while about actual implementation.
Except this problem, my patch improves the situation. At least, vi no
longer wastes MB of memory. Other commands using terminfo/curses, less,
more, rogue, tetris, and sysinst work fine. Could anyone please review
and commit it?
Rin
Home |
Main Index |
Thread Index |
Old Index