diff options
author | Rickard Green <[email protected]> | 2016-06-28 17:40:45 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2016-08-30 16:58:15 +0200 |
commit | f36e430a1482ee91d7f8b5ff72477ee6882b876d (patch) | |
tree | 879cdece142a9f7d250e3e4c1e68ceb010a4c6fa /erts/emulator/beam/erl_message.h | |
parent | 925984e94f2c1933bb659dfb626c191982b7c8d4 (diff) | |
download | otp-f36e430a1482ee91d7f8b5ff72477ee6882b876d.tar.gz otp-f36e430a1482ee91d7f8b5ff72477ee6882b876d.tar.bz2 otp-f36e430a1482ee91d7f8b5ff72477ee6882b876d.zip |
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.h | 11 |
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 |