diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-03-28 02:43:16 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-03-28 02:43:16 +0200 |
commit | b4e2a846e1c619988d1f9a74b33d8f3eeafecf94 (patch) | |
tree | 17b573c32d73ecb01b97a1d7cc244a312ddec734 | |
parent | 871bd8f1640d29d312776ea04b82a4af0a4bba23 (diff) | |
download | Nim-b4e2a846e1c619988d1f9a74b33d8f3eeafecf94.tar.gz |
munmap for LLVM
-rw-r--r-- | lib/system/osalloc.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/system/osalloc.nim b/lib/system/osalloc.nim index cc1a28213..78410d716 100644 --- a/lib/system/osalloc.nim +++ b/lib/system/osalloc.nim @@ -94,7 +94,7 @@ elif defined(posix): proc mmap(adr: pointer, len: int, prot, flags, fildes: cint, off: int): pointer {.header: "<sys/mman.h>".} - proc munmap(adr: pointer, len: int) {.header: "<sys/mman.h>".} + proc munmap(adr: pointer, len: int): cint {.header: "<sys/mman.h>".} proc osAllocPages(size: int): pointer {.inline.} = result = mmap(nil, size, PROT_READ or PROT_WRITE, @@ -108,7 +108,7 @@ elif defined(posix): if result == cast[pointer](-1): result = nil proc osDeallocPages(p: pointer, size: int) {.inline} = - when reallyOsDealloc: munmap(p, size) + when reallyOsDealloc: discard munmap(p, size) elif defined(windows): const |