diff options
Diffstat (limited to 'byterun/memory.c')
-rw-r--r-- | byterun/memory.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/byterun/memory.c b/byterun/memory.c index e18bde45c1..54d91c96da 100644 --- a/byterun/memory.c +++ b/byterun/memory.c @@ -502,7 +502,8 @@ CAMLexport void caml_adjust_gc_speed (mlsize_t res, mlsize_t max) */ /* [caml_initialize] never calls the GC, so you may call it while a block is unfinished (i.e. just after a call to [caml_alloc_shr].) */ -CAMLexport void caml_initialize (value *fp, value val) +/* PR#6084 workaround: define it as a weak symbol */ +CAMLexport CAMLweakdef void caml_initialize (value *fp, value val) { CAMLassert(Is_in_heap(fp)); *fp = val; @@ -522,12 +523,12 @@ CAMLexport void caml_initialize (value *fp, value val) in the minor heap instead of in the major heap. In this case, it is a bit slower than simple assignment. In particular, you can use [caml_modify] when you don't know whether the - block being changed is in the minor heap or the major heap. -*/ + block being changed is in the minor heap or the major heap. */ +/* PR#6084 workaround: define it as a weak symbol */ -CAMLexport void caml_modify (value *fp, value val) +CAMLexport CAMLweakdef void caml_modify (value *fp, value val) { - /* The write barrier implemented by [caml_modify] checks for the + /* The write barrier implemented by [caml_modify] checks for the following two conditions and takes appropriate action: 1- a pointer from the major heap to the minor heap is created --> add [fp] to the remembered set |