summaryrefslogtreecommitdiff
path: root/byterun/memory.c
diff options
context:
space:
mode:
authorLuc Maranget <luc.maranget@inria.fr>2014-03-13 15:03:16 +0000
committerLuc Maranget <luc.maranget@inria.fr>2014-03-13 15:03:16 +0000
commit1338d73c180d22cd2fd2abc5b46554a56f66b1f5 (patch)
tree1d7171e373a49abdbac5bc790f896aadbca27718 /byterun/memory.c
parent18e6a3781be059367bfff403aa8a41e9dc200844 (diff)
downloadocaml-jo401.tar.gz
Merge jo401 w.r.t ocaml/4.01 from 13776 to 14115jo401
Plus ld.conf changes git-svn-id: http://caml.inria.fr/svn/ocaml/branches/jo401@14458 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/memory.c')
-rw-r--r--byterun/memory.c11
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