[MLton-devel] mlton/runtime GC_world.c,1.4,1.5 gc.c,1.43,1.44 gc.h,1.21,1.22

Stephen Weeks MLton@mlton.org
Tue, 23 Apr 2002 21:55:01 -0700


> I'm curious why live, the second arg to computeSemiSize() is a W64 instead of
> a uint.  (Any calculations in the function need to be done using  W64's,  but
> the input seems like it must always fit.)

See lines 1579-81 of gc.c.  In that case, the "live" can exceed 4G.

> In translatePointer(), wouldn't it be cheaper (low level tweak, and  probably
> not  important)  to  make s->translateDirection a bool (named something else)
> with the new TRUE being the current 1 and the new FALSE being the current -1.
> (This assumes it is always +1 or -1.)

Yes.  Done.

> It  would  be  nice  to  have a bit more documentation in the code about what
> translateDirection is doing.  Are you actually setting the first arg to  mmap
> to  something? 

Yes, but only to try to avoid address space fragmentation.

> Are you using MAP_FIXED?

No.

> In resizeHeap(), shouldn't `20' be a #define  or  enum  like  LIVE_RATIO  and
> friends?  (Same for `3'.)

Sure.  Done.

> Wouldn't  it  be  much better to have alternate C files for shrinkFromSpace()
> for the CYGWIN and linux cases?  I guess that  wouldn't  work  if  there  are
> problems with the static stuff, but it seems pretty ugly (although small).

Yeah, the static stuff causes problems.

_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel