[MLton] powerpc, getrusage problem again?
Stephen Weeks
MLton@mlton.org
Thu, 18 Aug 2005 08:51:35 -0700
> I reported earlier that MLton was calling getrusage alot.
> This had something to do with HAS_WEAK?
Yes. With HAS_WEAK = FALSE, every gc will call getrusage.
> Well, the problem still appears on powerpc, but not i386.
The difference is that linux.h has
#define HAS_WEAK TRUE
while darwin.h has
#define HAS_WEAK FALSE
> So, I am guessing that for some reason powerpc has no weak pointers?
To be clear, we're talking about gcc's "__attribute__ ((weak));",
which has nothing to do with MLton.Weak.
I suspect that gcc on Darwin does support the weak attribute, just
that we haven't tried compiling the runtime with HAS_WEAK TRUE, or
when we did there was some error that hasn't been investigated.
In any case, it is on my todo list to eliminate all the HAS_WEAK stuff
completely, and make it controllable via an SML bool ref whether or
not the runtime measures GC time. That is completely portable and
quite fast.