summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-12-04 00:47:36 (GMT)
committerJason Evans <jasone@canonware.com>2016-12-04 00:50:58 (GMT)
commitacb7b1f53e25fcad89375512e6eaea8115dc6af5 (patch)
tree63f318c558656c195a020896e3bb1c63b08ad2a5 /src
parent7179351a45f00fa943cfe23b555036615b91ce9d (diff)
downloadjemalloc-acb7b1f53e25fcad89375512e6eaea8115dc6af5.zip
jemalloc-acb7b1f53e25fcad89375512e6eaea8115dc6af5.tar.gz
jemalloc-acb7b1f53e25fcad89375512e6eaea8115dc6af5.tar.bz2
Add --disable-syscall.
This resolves #517.
Diffstat (limited to 'src')
-rw-r--r--src/pages.c6
-rw-r--r--src/util.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/pages.c b/src/pages.c
index 395ace9..6af228a 100644
--- a/src/pages.c
+++ b/src/pages.c
@@ -219,7 +219,7 @@ os_overcommits_proc(void)
char buf[1];
ssize_t nread;
-#if defined(JEMALLOC_HAVE_SYSCALL) && defined(SYS_open)
+#if defined(JEMALLOC_USE_SYSCALL) && defined(SYS_open)
fd = (int)syscall(SYS_open, "/proc/sys/vm/overcommit_memory", O_RDONLY);
#else
fd = open("/proc/sys/vm/overcommit_memory", O_RDONLY);
@@ -227,13 +227,13 @@ os_overcommits_proc(void)
if (fd == -1)
return (false); /* Error. */
-#if defined(JEMALLOC_HAVE_SYSCALL) && defined(SYS_read)
+#if defined(JEMALLOC_USE_SYSCALL) && defined(SYS_read)
nread = (ssize_t)syscall(SYS_read, fd, &buf, sizeof(buf));
#else
nread = read(fd, &buf, sizeof(buf));
#endif
-#if defined(JEMALLOC_HAVE_SYSCALL) && defined(SYS_close)
+#if defined(JEMALLOC_USE_SYSCALL) && defined(SYS_close)
syscall(SYS_close, fd);
#else
close(fd);
diff --git a/src/util.c b/src/util.c
index 5b8175b..dd8c236 100644
--- a/src/util.c
+++ b/src/util.c
@@ -49,7 +49,7 @@ static void
wrtmessage(void *cbopaque, const char *s)
{
-#if defined(JEMALLOC_HAVE_SYSCALL) && defined(SYS_write)
+#if defined(JEMALLOC_USE_SYSCALL) && defined(SYS_write)
/*
* Use syscall(2) rather than write(2) when possible in order to avoid
* the possibility of memory allocation within libc. This is necessary