bugGNU nano - Bugs: bug #47303, a redefined syntax is incompletely...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #47303: a redefined syntax is incompletely freed

Submitter:  Benno Schulenberg <bens>
Submitted:  Mon 29 Feb 2016 12:39:07 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Tue 01 Mar 2016 11:22:56 AM UTC, comment #2: 

Addressed in SVN, r5704, by not freeing a duplicate syntax at all: it will be rather seldom, and it doesn't gain much memory.

Benno Schulenberg <bens>
Group administrator
Mon 29 Feb 2016 08:21:53 PM UTC, comment #1: 

Running nano without any arguments eats up 500K of heap memory here (using valgrind).  Freeing the Python syntax completely (that I locally redefine for testing purposes) would save 800 bytes.  That's not worth the trouble.  Just define a new syntax with the same name, and at selection time pick the one that was defined last.

(If the user really wants to minimize the memory usage of nano, they should the trim the number of syntaxes included in /etc/nanorc (which I already do), or run with --ignore, or compile their nano with --enable-tiny.)

Benno Schulenberg <bens>
Group administrator
Mon 29 Feb 2016 12:39:07 PM UTC, original submission:  

Add the following two lines at the end of your .nanorc:

syntax "python" "\.py$"
color green ".*"

And see how nano loses some 700 bytes of memory.

Benno Schulenberg <bens>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-06-20 bens Open/ClosedOpen Closed
    2016-03-01 bens StatusIn Progress Fixed
    2016-02-29 bens StatusNone In Progress

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code