bugPSPP - Bugs: bug #24597, Reduce size of struct variable

 
 

bug #24597: Reduce size of struct variable

Submitter:  Ben Pfaff <blp>
Submitted:  Sat 18 Oct 2008 03:27:48 AM UTC
   
 
Category:  Compilation/Portability Severity:  1 - Wishlist
Status:  Fixed Assigned to:  blp
Open/Closed:  Closed Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 14 May 2011 04:40:59 AM UTC, comment #2: 

I think this is probably a waste of time in an era of 4 GB machines, so I'm closing it.

I wholeheartedly agree with John's comment, though.

Ben Pfaff <blp>
Group administrator
Wed 27 Oct 2010 04:03:56 PM UTC, comment #1: 

It would also be nice if we could get rid of the aux and aux_dtor members, which IMO are a bit of a kludge.

John Darrington <jmd>
Group administrator
Sat 18 Oct 2008 03:27:48 AM UTC, original submission:  

On x86-32, struct variable is 184 bytes.  This could be reduced considerably:

  • 68 bytes of that is the variable name, which could be allocated via pointer


  • 24 bytes is print and write formats, which really only need 3 or 4 bytes each


  • 32 bytes is missing values, which should be reducible to a pointer or at most to 8 bytes


  • Alignment, measurement, and, leave each occupy 4 bytes and none needs more than 1.


  • Width and display width shouldn't need more than 2 bytes each.


It should therefore be possible to reduce its size to something closer to 64 bytes (modulo any wastage from allocatig the name via pointer).  This may be a useful savings when we start allocating large numbers of variables.

Ben Pfaff <blp>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

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 jmd (Posted a comment)
  • -email is unavailable- added by blp (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.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-05-14 blp StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code