nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] memory leak


From: brand999
Subject: Re: [Nano-devel] memory leak
Date: Sun, 7 Sep 2003 13:42:27 -0600

On Sun, 7 Sep 2003 10:32:56 -0400
Chris Allegretta <address@hidden> wrote:

> Your proposal looks very good to me, it seems to address some
> shortcomings in the current code while trying to be backward
> compatible with the existing syntax for color definitions.  However
> I'm not the maintainer for the 1.3 series which is the current
> development series, so you're really looking for David Lawrence
> Ramsey's approval.  There is the issue that we should try to fix
> what's broken if possible rather than just scrapping it; I'm not sure
> any code is totally bug free but if you write good (and readable) code
> I imagine your patch would be accepted.  I would put your proposal to
> the list and solicit feedback, I will be happy to reiterate these
> comments there.  Thanks much.

[ Changes are listed in the attached file ]

A lot of the changes wouldn't require rewriting existing code. I
wouldn't want to implement file inclusion until nano ignores all but the
current syntax or else it would be loading many unneeded files on
startup.

Rewriting the code to only update colors when the text is modified would
reduce the memory problem a little. The scope rules would also help by
eliminating evaluation  of several REs in sections of the text that
don't apply to them. A "break" command that stops evaluating all REs
when the previous RE matches would be another step to reducing the
number of evaluated REs per update.

An example of break would be to put string and comment colors at the top
of the syntax, each followed by a break. If either matches then no other
REs would be applied to that text.

None of these changes would fix the problem but it might just 'go away'
if these changes are made. ;)


-- 
Brand Huntsman -- http://www.qzx.com
Linux 2.4.21 (i686 451MHz) up 41 days 8:21 hours, 1207472 procs

Attachment: nanorc.txt
Description: Text document


reply via email to

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