diff --git a/core/src/gc.ml b/core/src/gc.ml index 558123e..4e402a7 100644 --- a/core/src/gc.ml +++ b/core/src/gc.ml @@ -392,7 +392,6 @@ external major_collections : unit -> int = "core_gc_major_collections" [@@noallo external compactions : unit -> int = "core_gc_compactions" [@@noalloc] external major_plus_minor_words : unit -> int = "core_gc_major_plus_minor_words" external allocated_words : unit -> int = "core_gc_allocated_words" -external run_memprof_callbacks : unit -> unit = "core_gc_run_memprof_callbacks" let zero = Sys.opaque_identity (int_of_string "0") @@ -513,11 +512,9 @@ module For_testing = struct (* Memprof.stop does not guarantee that all memprof callbacks are run (some may be delayed if they happened during C code and there has been no allocation since), so we explictly flush them *) - run_memprof_callbacks (); Caml.Gc.Memprof.stop (); x | exception e -> - run_memprof_callbacks (); Caml.Gc.Memprof.stop (); raise e in diff --git a/core/src/gc_stubs.c b/core/src/gc_stubs.c index 6011230..f54c5f4 100644 --- a/core/src/gc_stubs.c +++ b/core/src/gc_stubs.c @@ -60,10 +60,3 @@ CAMLprim value core_gc_allocated_words(value unit __attribute__((unused))) { return Val_long(minor_words() + major_words() - promoted_words()); } - -CAMLprim value core_gc_run_memprof_callbacks(value unit __attribute__((unused))) -{ - value exn = caml_memprof_handle_postponed_exn(); - caml_raise_if_exception(exn); - return Val_unit; -}