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

 
 

bug #24597: Reduce size of struct variable

Submitted by:  Ben Pfaff <blp>
Submitted on:  Sat 18 Oct 2008 03:27:48 AM UTC  
 
Category: Compilation/PortabilitySeverity: 1 - Wishlist
Status: FixedAssigned to: Ben Pfaff <blp>
Open/Closed: ClosedRelease: None
Effort: 0.00

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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>
Project AdministratorIn charge of this item.
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>
Project 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>
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 jmd (Posted a comment)
  • -unavailable- added by blp (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 14 May 2011 04:40:59 AM UTCblpStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1