(* C library and memory *)
val library_path =
Path.explode ("$ML_HOME/" ^ (if ML_System.platform_is_windows then "sha1.dll" else "libsha1.so"));
Path.explode ("$SHA1_HOME/" ^ (if ML_System.platform_is_windows then "sha1.dll" else "libsha1.so"));
fun with_memory n =
Thread_Attributes.uninterruptible (fn restore_attributes => fn f =>