aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/global.h
diff options
context:
space:
mode:
authorNikolaos S. Papaspyrou <[email protected]>2014-03-14 11:32:46 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-11-17 14:45:45 +0100
commit8d02ad60c88aa060ff83ff3179bc8c0ab66868ee (patch)
tree3368a591afaa2d23c9d7b38d70f80dc42785ccbb /erts/emulator/beam/global.h
parent7141fa8e4534ab7e4dcc3cad6c46872efa0e6e66 (diff)
downloadotp-8d02ad60c88aa060ff83ff3179bc8c0ab66868ee.tar.gz
otp-8d02ad60c88aa060ff83ff3179bc8c0ab66868ee.tar.bz2
otp-8d02ad60c88aa060ff83ff3179bc8c0ab66868ee.zip
Add machinery to enable SHCOPY dynamically
This commit is just for debugging purposes, will probably be reverted. It comes with a the erts_debug:copy_shared/1 BIF. If SHCOPY_DISABLE is defined, SHCOPY starts disabled and is dynamically enabled the first time that the BIF is called.
Diffstat (limited to 'erts/emulator/beam/global.h')
-rw-r--r--erts/emulator/beam/global.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index a5e6ff6f1c..3e1f3664bc 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -1044,6 +1044,8 @@ void erl_error(char*, va_list);
#if defined(SHCOPY_SEND) \
|| defined(SHCOPY_SPAWN)
#define SHCOPY
+/* Use this if you want sharing-preserving copy to be initially disabled */
+#undef SHCOPY_DISABLE
/* Use this with care, it is *very* verbose! */
#undef SHCOPY_DEBUG
#endif