diff options
author | Stefan Fritsch <sf@apache.org> | 2011-06-01 19:45:24 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2011-06-01 19:45:24 +0000 |
commit | 672c9fe3b5ac2f4f22e4377dd8f41ead1c1989c0 (patch) | |
tree | b1a85dc34a328e2c3b47b0046db5ad91e4f5c5ba /memory | |
parent | 101a5c9627f8d0e51be800cc38d78f08f69c97b2 (diff) | |
download | apr-672c9fe3b5ac2f4f22e4377dd8f41ead1c1989c0.tar.gz |
Fix crash with --enable-allocator-uses-mmap on machines with pagesize >= 8k.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1130270 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'memory')
-rw-r--r-- | memory/unix/apr_pools.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c index c0d470b03..968123c1b 100644 --- a/memory/unix/apr_pools.c +++ b/memory/unix/apr_pools.c @@ -47,7 +47,12 @@ * Magic numbers */ -#define MIN_ALLOC 8192 +/* + * XXX: This is not optimal for machines with large pagesize, but currently + * XXX: the sink is assumed to be index 0, so MIN_ALLOC must be at least two + * XXX: pages. + */ +#define MIN_ALLOC (2 * BOUNDARY_SIZE) #define MAX_INDEX 20 #if APR_ALLOCATOR_USES_MMAP && defined(_SC_PAGESIZE) |