aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/global.h
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-09-01 15:30:49 +0200
committerRickard Green <[email protected]>2016-09-01 15:30:49 +0200
commit068185ef518384c0141cc643820f3a2a103ff4c3 (patch)
tree6b481e9de868bb3292906852c7426d498b55bbb4 /erts/emulator/beam/global.h
parentb4a93a0fc6d01cf2682652f7be16e020bdb10e3e (diff)
parentb022c5a175c528ebb66df129ddaa9f2d0b20a923 (diff)
downloadotp-068185ef518384c0141cc643820f3a2a103ff4c3.tar.gz
otp-068185ef518384c0141cc643820f3a2a103ff4c3.tar.bz2
otp-068185ef518384c0141cc643820f3a2a103ff4c3.zip
Merge branch 'rickard/new-purge-strategy/OTP-13833' into maint
* rickard/new-purge-strategy/OTP-13833: Fix reclaim of literal areas Conflicts: erts/emulator/beam/beam_bif_load.c
Diffstat (limited to 'erts/emulator/beam/global.h')
-rw-r--r--erts/emulator/beam/global.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index e6dc5303a8..b2c76aa605 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -1016,7 +1016,10 @@ typedef struct ErtsLiteralArea_ {
#define ERTS_LITERAL_AREA_ALLOC_SIZE(N) \
(sizeof(ErtsLiteralArea) + sizeof(Eterm)*((N) - 1))
-extern ErtsLiteralArea *erts_copy_literal_area;
+extern erts_smp_atomic_t erts_copy_literal_area__;
+#define ERTS_COPY_LITERAL_AREA() \
+ ((ErtsLiteralArea *) erts_smp_atomic_read_nob(&erts_copy_literal_area__))
+
#ifdef ERTS_NEW_PURGE_STRATEGY
extern Process *erts_literal_area_collector;
#endif
@@ -1107,7 +1110,7 @@ typedef struct {
#define INITIALIZE_SHCOPY(info) \
do { \
- ErtsLiteralArea *larea__ = erts_copy_literal_area; \
+ ErtsLiteralArea *larea__ = ERTS_COPY_LITERAL_AREA();\
info.queue_start = info.queue_default; \
info.bitstore_start = info.bitstore_default; \
info.shtable_start = info.shtable_default; \