apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1130270 - /apr/apr/trunk/memory/unix/apr_pools.c
Date Wed, 01 Jun 2011 19:45:24 GMT
Author: sf
Date: Wed Jun  1 19:45:24 2011
New Revision: 1130270

URL: http://svn.apache.org/viewvc?rev=1130270&view=rev
Log:
Fix crash with --enable-allocator-uses-mmap on machines with pagesize >= 8k.

Modified:
    apr/apr/trunk/memory/unix/apr_pools.c

Modified: apr/apr/trunk/memory/unix/apr_pools.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/memory/unix/apr_pools.c?rev=1130270&r1=1130269&r2=1130270&view=diff
==============================================================================
--- apr/apr/trunk/memory/unix/apr_pools.c (original)
+++ apr/apr/trunk/memory/unix/apr_pools.c Wed Jun  1 19:45:24 2011
@@ -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)



Mime
View raw message