From 1338d73c180d22cd2fd2abc5b46554a56f66b1f5 Mon Sep 17 00:00:00 2001 From: Luc Maranget Date: Thu, 13 Mar 2014 15:03:16 +0000 Subject: Merge jo401 w.r.t ocaml/4.01 from 13776 to 14115 Plus ld.conf changes git-svn-id: http://caml.inria.fr/svn/ocaml/branches/jo401@14458 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- byterun/memory.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'byterun/memory.c') 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 -- cgit v1.2.1