[MLton-devel] benchmarks -align {4,8}

Stephen Weeks MLton@mlton.org
Fri, 25 Apr 2003 17:17:52 -0700


> Is  it really hard to make it so that mod-8 alignment only happens for things
> that want it (doubles)?  My notion was that while allocating things of  fixed
> size  (i.e.,  almost everything) you keep track of your alignment mod 8 (only
> ever 0 or 4).  As long as after a GC or variable-sized allocation or function
> call/return you align things mod 8 then this is always known at compile time.
> (I guess you also have to align it at join points.)

It starts to get messy.  Plus you have to tell the runtime about
objects with doubles and it has to do the selective alignment too.
And, as my checkin comment said, that causes problems:

  I worked for a bit on doing selective alignment by frontier skipping,
  i.e., only aligning objects with doubles in them by aligning the
  frontier immediately before allocation of an object with a double.
  Unfortunately, this doesn't work well with copying GC, since depending
  on the vagaries of object order, more or less extra space might be
  needed for frontier alignment.  So a copying GC might need more space
  in to space than in from space.  I decided I didn't want to deal with
  that, so I stuck with the alignment via object padding above.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel