src/Pure/ML/ml_heap.ML
author wenzelm
Sat, 17 Feb 2018 19:37:18 +0100
changeset 67647 27f3dceb5a70
parent 67622 5289d3bdb261
child 69826 1bea05713dde
permissions -rw-r--r--
avoid conflict with Isabelle/jEdit completion of '>', e.g. "-->", "==>";

(*  Title:      Pure/ML/ml_heap.ML
    Author:     Makarius

ML heap operations.
*)

signature ML_HEAP =
sig
  val obj_size: 'a -> int
  val full_gc: unit -> unit
  val share_common_data: unit -> unit
  val save_child: string -> unit
end;

structure ML_Heap: ML_HEAP =
struct

val obj_size = PolyML.objSize;

val full_gc = PolyML.fullGC;

fun share_common_data () = PolyML.shareCommonData PolyML.rootFunction;

fun save_child name =
  PolyML.SaveState.saveChild (name, List.length (PolyML.SaveState.showHierarchy ()));

end;