You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by sf...@apache.org on 2011/06/01 21:51:51 UTC

svn commit: r1130276 - /apr/apr/branches/1.5.x/memory/unix/apr_pools.c

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)