diff options
Diffstat (limited to 'byterun/extern.c')
-rw-r--r-- | byterun/extern.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/byterun/extern.c b/byterun/extern.c index 221e206df3..f110dff2ac 100644 --- a/byterun/extern.c +++ b/byterun/extern.c @@ -383,6 +383,8 @@ static void writecode64(int code, intnat val) /* Marshal the given value in the output buffer */ +int caml_extern_allow_out_of_heap = 0; + static void extern_rec(value v) { struct code_fragment * cf; @@ -409,7 +411,7 @@ static void extern_rec(value v) writecode32(CODE_INT32, n); goto next_item; } - if (Is_in_value_area(v)) { + if (Is_in_value_area(v) || caml_extern_allow_out_of_heap) { header_t hd = Hd_val(v); tag_t tag = Tag_hd(hd); mlsize_t sz = Wosize_hd(hd); |