apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1130276 - /apr/apr/branches/1.5.x/memory/unix/apr_pools.c
Date Wed, 01 Jun 2011 19:51:51 GMT
Author: sf
Date: Wed Jun  1 19:51:50 2011
New Revision: 1130276

URL: http://svn.apache.org/viewvc?rev=1130276&view=rev
Log:
Backport r1130270, r1130274:

Fix crash with --enable-allocator-uses-mmap on machines with pagesize >= 8k.

Modified:
    apr/apr/branches/1.5.x/memory/unix/apr_pools.c

Modified: apr/apr/branches/1.5.x/memory/unix/apr_pools.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/memory/unix/apr_pools.c?rev=1130276&r1=1130275&r2=1130276&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/memory/unix/apr_pools.c (original)
+++ apr/apr/branches/1.5.x/memory/unix/apr_pools.c Wed Jun  1 19:51:50 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)



Mime
View raw message