aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2017-08-22 15:53:23 +0200
committerLukas Larsson <[email protected]>2017-08-22 15:53:23 +0200
commit8a5062ef1fe4b9b56c29019f934c027758f2b163 (patch)
tree48d8d566ba5de003ced8bfb29af4f2f463d85cfd
parentd25e050b9f22d0a1427dcd2d77528b2bc5264c17 (diff)
parent90d2a1c4b85ce8dab16c7000cb02ab947337a64f (diff)
downloadotp-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
-rw-r--r--erts/emulator/beam/erl_vm.h4
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))