diff options
author | sf <sf@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-01 19:51:50 +0000 |
---|---|---|
committer | sf <sf@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-01 19:51:50 +0000 |
commit | f22c4e38355b780a1c2b348698d6da1201a944c9 (patch) | |
tree | a3ae1fc4d47f645b12f775fbcb8035ba76f469dc /memory | |
parent | 281ea1b0f5e2112a10739f0481dd05414a68ec5f (diff) | |
download | libapr-f22c4e38355b780a1c2b348698d6da1201a944c9.tar.gz |
Backport r1130270, r1130274:
Fix crash with --enable-allocator-uses-mmap on machines with pagesize >= 8k.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1130276 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 9ac397791..461e6df7b 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 when using --enable-allocator-uses-mmap on + * XXX: machines with large pagesize, but currently the sink is assumed + * XXX: to be index 0, so MIN_ALLOC must be at least two pages. + */ +#define MIN_ALLOC (2 * BOUNDARY_SIZE) #define MAX_INDEX 20 #if APR_ALLOCATOR_USES_MMAP && defined(_SC_PAGESIZE) |