diff options
author | Rickard Green <[email protected]> | 2016-08-31 15:37:56 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2016-08-31 15:37:56 +0200 |
commit | 2652d2f9b9f58746b80786fe7e62ae36b09bc890 (patch) | |
tree | 50eecb885785c0209b39e795f733fc10ed6a3ee1 /erts/emulator/beam/utils.c | |
parent | 451eb69edbe6c1b2ed53bcac18babda57e5f964c (diff) | |
parent | f36e430a1482ee91d7f8b5ff72477ee6882b876d (diff) | |
download | otp-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/utils.c')
-rw-r--r-- | erts/emulator/beam/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c index 85647b8500..6786657faf 100644 --- a/erts/emulator/beam/utils.c +++ b/erts/emulator/beam/utils.c @@ -102,6 +102,7 @@ erts_heap_alloc(Process* p, Uint need, Uint xtra) if (bp != NULL && need <= (bp->alloc_size - bp->used_size)) { Eterm* ret = bp->mem + bp->used_size; bp->used_size += need; + p->mbuf_sz += need; return ret; } #ifdef DEBUG @@ -124,7 +125,7 @@ erts_heap_alloc(Process* p, Uint need, Uint xtra) MBUF(p) = bp; bp->alloc_size = n; bp->used_size = need; - MBUF_SIZE(p) += n; + MBUF_SIZE(p) += need; bp->off_heap.first = NULL; bp->off_heap.overhead = 0; return bp->mem; |