diff options
author | Lukas Larsson <[email protected]> | 2017-08-22 15:53:23 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2017-08-22 15:53:23 +0200 |
commit | 8a5062ef1fe4b9b56c29019f934c027758f2b163 (patch) | |
tree | 48d8d566ba5de003ced8bfb29af4f2f463d85cfd /erts/emulator/beam/erl_vm.h | |
parent | d25e050b9f22d0a1427dcd2d77528b2bc5264c17 (diff) | |
parent | 90d2a1c4b85ce8dab16c7000cb02ab947337a64f (diff) | |
download | otp-8a5062ef1fe4b9b56c29019f934c027758f2b163.tar.gz otp-8a5062ef1fe4b9b56c29019f934c027758f2b163.tar.bz2 otp-8a5062ef1fe4b9b56c29019f934c027758f2b163.zip |
Merge branch 'lukas/erts/HRelease-assert'
* lukas/erts/HRelease-assert:
erts: Add HRelease endp assert
Diffstat (limited to 'erts/emulator/beam/erl_vm.h')
-rw-r--r-- | erts/emulator/beam/erl_vm.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_vm.h b/erts/emulator/beam/erl_vm.h index 42082f9c3e..f2d0af64df 100644 --- a/erts/emulator/beam/erl_vm.h +++ b/erts/emulator/beam/erl_vm.h @@ -102,9 +102,11 @@ if ((ptr) == (endp)) { \ ; \ } else if (HEAP_START(p) <= (ptr) && (ptr) < HEAP_TOP(p)) { \ + ASSERT(HEAP_TOP(p) == (endp)); \ HEAP_TOP(p) = (ptr); \ } else { \ - erts_heap_frag_shrink(p, ptr); \ + ASSERT(MBUF(p)->mem + MBUF(p)->used_size == (endp)); \ + erts_heap_frag_shrink(p, ptr); \ } #define HeapWordsLeft(p) (HEAP_LIMIT(p) - HEAP_TOP(p)) |