summaryrefslogtreecommitdiffstats
path: root/src/chunk_mmap.c
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2012-04-30 10:38:26 (GMT)
committerJason Evans <je@fb.com>2012-04-30 23:50:55 (GMT)
commita14bce85e885f83c96116cc5438ae52d740f3727 (patch)
treeafc19981fe9e5b0de90645189626dae967733ad8 /src/chunk_mmap.c
parentaf04b744bda40842631d80ad04e1510308b13e54 (diff)
downloadjemalloc-a14bce85e885f83c96116cc5438ae52d740f3727.zip
jemalloc-a14bce85e885f83c96116cc5438ae52d740f3727.tar.gz
jemalloc-a14bce85e885f83c96116cc5438ae52d740f3727.tar.bz2
Use Get/SetLastError on Win32
Using errno on win32 doesn't quite work, because the value set in a shared library can't be read from e.g. an executable calling the function setting errno. At the same time, since buferror always uses errno/GetLastError, don't pass it.
Diffstat (limited to 'src/chunk_mmap.c')
-rw-r--r--src/chunk_mmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/chunk_mmap.c b/src/chunk_mmap.c
index 0ad65a1..9f388d2 100644
--- a/src/chunk_mmap.c
+++ b/src/chunk_mmap.c
@@ -41,7 +41,7 @@ pages_map(void *addr, size_t size)
if (munmap(ret, size) == -1) {
char buf[BUFERROR_BUF];
- buferror(errno, buf, sizeof(buf));
+ buferror(buf, sizeof(buf));
malloc_printf("<jemalloc: Error in munmap(): %s\n",
buf);
if (opt_abort)
@@ -67,7 +67,7 @@ pages_unmap(void *addr, size_t size)
{
char buf[BUFERROR_BUF];
- buferror(errno, buf, sizeof(buf));
+ buferror(buf, sizeof(buf));
malloc_printf("<jemalloc>: Error in "
#ifdef _WIN32
"VirtualFree"