#include #include #include #include #include #include /** * Wrapper for caml_unix_code_of_unix_error that returns a real OCaml int value */ CAMLprim value ocaml_systemd_unix_code_of_unix_error(value code) { CAMLparam1(code); CAMLlocal1(result); int raw_code = caml_unix_code_of_unix_error(code); result = Val_int(raw_code); CAMLreturn(result); } CAMLprim value ocaml_systemd_memory_trim(value unit) { CAMLparam1(unit); #ifdef OCAML_SYSTEMD_USE_MALLOC_TRIM malloc_trim(0); #endif CAMLreturn(Val_unit); }