[MLton] commit r4134: fixed fix to getrusage bug

Matthew Fluet fluet@mlton.org
Wed, 2 Nov 2005 19:41:43 -0800


In Revision 3995:

  Added

    val MLton.GC.setRusage: bool -> unit

  This sets a flag in the GC state that controls whether rusage
  information is gathered for each collection.  The default is FALSE,
  which is different than earlier behavior, but probably makes sense
  because the getrusage calls at each GC can be costly, because
  MLton.Rusage.rusage is not so used, and because it's easy to enable
  the old behavior by calling MLton.GC.setRusage false.

However, this function was never used in the basis library.  In
particular, we never enabled rusage when MLton.Rusage.rusage was used.
This further meant that Timer.getGCTime would _always_ return zero,
unless the user happened to run with gc-summary or gc-messages (or
used the corresponding MLton.GC functions).


----------------------------------------------------------------------

U   mlton/trunk/basis-library/libs/basis-extra/basis-extra.mlb
U   mlton/trunk/basis-library/mlton/rusage.sml
U   mlton/trunk/runtime/basis/GC.c