aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_message.h
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-08-31 15:37:56 +0200
committerRickard Green <[email protected]>2016-08-31 15:37:56 +0200
commit2652d2f9b9f58746b80786fe7e62ae36b09bc890 (patch)
tree50eecb885785c0209b39e795f733fc10ed6a3ee1 /erts/emulator/beam/erl_message.h
parent451eb69edbe6c1b2ed53bcac18babda57e5f964c (diff)
parentf36e430a1482ee91d7f8b5ff72477ee6882b876d (diff)
downloadotp-2652d2f9b9f58746b80786fe7e62ae36b09bc890.tar.gz
otp-2652d2f9b9f58746b80786fe7e62ae36b09bc890.tar.bz2
otp-2652d2f9b9f58746b80786fe7e62ae36b09bc890.zip
Merge branch 'rickard/mbuf_sz/OTP-13851' into maint
* rickard/mbuf_sz/OTP-13851: Ensure correct mbuf_sz value in process structure
Diffstat (limited to 'erts/emulator/beam/erl_message.h')
-rw-r--r--erts/emulator/beam/erl_message.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_message.h b/erts/emulator/beam/erl_message.h
index 6df969367b..42ed14e69c 100644
--- a/erts/emulator/beam/erl_message.h
+++ b/erts/emulator/beam/erl_message.h
@@ -499,4 +499,15 @@ erts_msgq_replace_msg_ref(ErlMessageQueue *msgq, ErtsMessage *newp, ErtsMessage
#endif
+Uint erts_mbuf_size(Process *p);
+#if defined(DEBUG) || 0
+# define ERTS_CHK_MBUF_SZ(P) \
+ do { \
+ Uint actual_mbuf_sz__ = erts_mbuf_size((P)); \
+ ERTS_ASSERT((P)->mbuf_sz >= actual_mbuf_sz__); \
+ } while (0)
+#else
+# define ERTS_CHK_MBUF_SZ(P) ((void) 1)
+#endif
+
#endif