aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/sys.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-09-21 15:50:48 +0200
committerSverker Eriksson <[email protected]>2016-09-21 15:50:48 +0200
commite8411511fdb2a830b284e3a37ca8a2dc749ff79f (patch)
treea5bda7b07281176fa3452a1fb36526761fd97003 /erts/emulator/beam/sys.h
parentd419183bb3d2204144492104f6f33a5753127b12 (diff)
parentd100187bde4f3f555b4f3cd9561ec8c67a528895 (diff)
downloadotp-e8411511fdb2a830b284e3a37ca8a2dc749ff79f.tar.gz
otp-e8411511fdb2a830b284e3a37ca8a2dc749ff79f.tar.bz2
otp-e8411511fdb2a830b284e3a37ca8a2dc749ff79f.zip
Merge branch 'sverker/ets-load-factor/OTP-13903'
* sverker/ets-load-factor: erts: Unify reduction count for ets:select stdlib: Cuddle ets_SUITE for valgrind stdlib: Fix ets_SUITE:smp_select_delete erts: Tweak ets grow/shrink to keep up at contention erts: Fix ets_SUITE:memory erts: Suppress failed ETS memory checks erts: Reduce ets hash load factor erts: Enable a smaller first hash segment for ets erts: Redesign ets with separate segment tables erts: Remove unnecessary access of 'is_resizing' erts: Add ErtsSizeofMember macro erts: Add ErtsContainerStruct_ for array members
Diffstat (limited to 'erts/emulator/beam/sys.h')
-rw-r--r--erts/emulator/beam/sys.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index dfe82cab44..16e6c33367 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -99,6 +99,12 @@
#define ErtsContainerStruct(ptr, type, member) \
((type *)((char *)(1 ? (ptr) : &((type *)0)->member) - offsetof(type, member)))
+/* Use this variant when the member is an array */
+#define ErtsContainerStruct_(ptr, type, memberv) \
+ ((type *)((char *)(1 ? (ptr) : ((type *)0)->memberv) - offsetof(type, memberv)))
+
+#define ErtsSizeofMember(type, member) sizeof(((type *)0)->member)
+
#if defined (__WIN32__)
# include "erl_win_sys.h"
#else