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