Author: sf
Date: Wed Jun 1 19:53:29 2011
New Revision: 1130277
URL: http://svn.apache.org/viewvc?rev=1130277&view=rev
Log:
Backport r1130270, r1130274:
Fix crash with --enable-allocator-uses-mmap on machines with pagesize >= 8k
Modified:
apr/apr/branches/1.4.x/memory/unix/apr_pools.c
Modified: apr/apr/branches/1.4.x/memory/unix/apr_pools.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/memory/unix/apr_pools.c?rev=1130277&r1=1130276&r2=1130277&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/memory/unix/apr_pools.c (original)
+++ apr/apr/branches/1.4.x/memory/unix/apr_pools.c Wed Jun 1 19:53:29 2011
@@ -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)
|