diff options
author | Rickard Green <[email protected]> | 2016-08-31 15:39:43 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2016-08-31 15:39:43 +0200 |
commit | dafdc7c779b1f6bda54f9a4ea6fb1e26b5e3b096 (patch) | |
tree | 7d38635c30d670bcd1f4aa77e041924cc8db1a68 /erts/emulator/beam/erl_message.h | |
parent | 74fecb1c89c9f3149dc0e42b2a4a19827a28370f (diff) | |
parent | 2652d2f9b9f58746b80786fe7e62ae36b09bc890 (diff) | |
download | otp-dafdc7c779b1f6bda54f9a4ea6fb1e26b5e3b096.tar.gz otp-dafdc7c779b1f6bda54f9a4ea6fb1e26b5e3b096.tar.bz2 otp-dafdc7c779b1f6bda54f9a4ea6fb1e26b5e3b096.zip |
Merge branch 'maint'
* maint:
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 |