aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/global.h
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-09-01 14:24:55 +0200
committerRickard Green <[email protected]>2016-09-01 15:08:23 +0200
commitb022c5a175c528ebb66df129ddaa9f2d0b20a923 (patch)
treeeacd612beea6859d8a65b804bd3e27bbe70cb5d2 /erts/emulator/beam/global.h
parent9d0638216d35ca0f21c1eea20f8daa3992ac4f71 (diff)
downloadotp-b022c5a175c528ebb66df129ddaa9f2d0b20a923.tar.gz
otp-b022c5a175c528ebb66df129ddaa9f2d0b20a923.tar.bz2
otp-b022c5a175c528ebb66df129ddaa9f2d0b20a923.zip
Fix reclaim of literal areas
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 00dfc421d5..76e6be5443 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -1014,7 +1014,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
@@ -1102,7 +1105,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; \