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/utils.c | |
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/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; |