diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2012-06-26 21:36:26 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2012-06-26 21:36:26 +0000 |
commit | 7a2e1ae3e799e15aa259832c9504d25261a5818b (patch) | |
tree | 0b207ab33a4191bb496c397c2501cdeb6f1e886b /lib/libc | |
parent | 81f1f4fede27b3f8bc659062b98da6ecbfd27624 (diff) |
after a talk with ariane, use MAP_FIXED for mquery to avoid the cost of
scanning for free space if the hint isn't available.
also, on further inspection, this will prevent pmap_prefer from "improving"
our hint.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdlib/malloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index 7a48a0f2ff4..7cab70585d9 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc.c,v 1.144 2012/06/22 01:30:17 tedu Exp $ */ +/* $OpenBSD: malloc.c,v 1.145 2012/06/26 21:36:25 tedu Exp $ */ /* * Copyright (c) 2008 Otto Moerbeek <otto@drijf.net> * @@ -95,7 +95,7 @@ MAP_ANON | MAP_PRIVATE, -1, (off_t) 0) #define MQUERY(a, sz) mquery((a), (size_t)(sz), PROT_READ | PROT_WRITE, \ - MAP_ANON | MAP_PRIVATE, -1, (off_t)0) + MAP_ANON | MAP_PRIVATE | MAP_FIXED, -1, (off_t)0) struct region_info { void *p; /* page; low bits used to mark chunks */ |