You need to check for `dec == NULL` and raise `caml_raise_out_of_memory()` in this case :)