1 (* Copyright (C
) 1999-2008 Henry Cejtin
, Matthew Fluet
, Suresh
2 * Jagannathan
, and Stephen Weeks
.
3 * Copyright (C
) 1997-2000 NEC Research Institute
.
5 * MLton is released under a BSD
-style license
.
6 * See the file MLton
-LICENSE for details
.
11 open Primitive
.MLton
.GC
13 val gcState
= Primitive
.MLton
.GCState
.gcState
15 val pack
: unit
-> unit
=
17 val unpack
: unit
-> unit
=
18 fn () => unpack gcState
20 val setHashConsDuringGC
: bool -> unit
=
21 fn b
=> setHashConsDuringGC (gcState
, b
)
22 val setMessages
: bool -> unit
=
23 fn b
=> setMessages (gcState
, b
)
24 val setRusageMeasureGC
: bool -> unit
=
25 fn b
=> setRusageMeasureGC (gcState
, b
)
26 val setSummary
: bool -> unit
=
27 fn b
=> setSummary (gcState
, b
)
29 structure Statistics
=
33 fn () => conv (prim gcState
)
34 val mkSize
= mk C_Size
.toLargeInt
35 val mkUIntmax
= mk C_UIntmax
.toLargeInt
37 val bytesAllocated
= mkUIntmax getBytesAllocated
38 val lastBytesLive
= mkSize getLastBytesLive
39 val maxBytesLive
= mkSize getMaxBytesLive
40 val numCopyingGCs
= mkUIntmax getNumCopyingGCs
41 val numMarkCompactGCs
= mkUIntmax getNumMarkCompactGCs
42 val numMinorGCs
= mkUIntmax getNumMinorGCs