src/Pure/ML/ml_heap.ML
author paulson <lp15@cam.ac.uk>
Tue, 19 Sep 2017 16:37:19 +0100
changeset 66660 bc3584f7ac0c
parent 62825 e6e80a8bf624
child 67622 5289d3bdb261
permissions -rw-r--r--
Using the "constant_on" operator

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

ML heap operations.
*)

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

structure ML_Heap: ML_HEAP =
struct

val obj_size = PolyML.objSize;

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

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

end;