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

 
 

bug #47303: a redefined syntax is incompletely freed

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

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 20 Jun 2016 09:44:25 AM UTCbensOpen/ClosedOpen=>Closed
    Tue 01 Mar 2016 11:22:56 AM UTCbensStatusIn Progress=>Fixed
    Mon 29 Feb 2016 08:21:53 PM UTCbensStatusNone=>In Progress

    Back to the top


    Powered by Savane 3.1-cleanup1