diff options
author | Simon Hafner <hafnersimon@gmail.com> | 2015-04-04 17:05:18 -0500 |
---|---|---|
committer | Simon Hafner <hafnersimon@gmail.com> | 2015-04-04 17:05:18 -0500 |
commit | 6ce53e3d634876c44ed31f4dc8546bd97a2c5b7f (patch) | |
tree | 222134f344851926dae986dbd41ca5df41f10812 | |
parent | a83286192ff286ce01f2223e16b1135a996c9f6c (diff) | |
download | Nim-6ce53e3d634876c44ed31f4dc8546bd97a2c5b7f.tar.gz |
some better sysassert messages
-rw-r--r-- | lib/system/alloc.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/system/alloc.nim b/lib/system/alloc.nim index fd3ced832..bc34b23a6 100644 --- a/lib/system/alloc.nim +++ b/lib/system/alloc.nim @@ -539,8 +539,8 @@ proc allocInv(a: TMemRegion): bool = proc rawAlloc(a: var TMemRegion, requestedSize: int): pointer = sysAssert(allocInv(a), "rawAlloc: begin") - sysAssert(roundup(65, 8) == 72, "rawAlloc 1") - sysAssert requestedSize >= sizeof(TFreeCell), "rawAlloc 2" + sysAssert(roundup(65, 8) == 72, "rawAlloc: roundup broken") + sysAssert(requestedSize >= sizeof(TFreeCell), "rawAlloc: requested size too small") var size = roundup(requestedSize, MemAlign) sysAssert(size >= requestedSize, "insufficient allocated size!") #c_fprintf(c_stdout, "alloc; size: %ld; %ld\n", requestedSize, size) |