Return-Path: X-Original-To: apmail-apr-commits-archive@www.apache.org Delivered-To: apmail-apr-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 89CF96E8B for ; Wed, 1 Jun 2011 19:52:14 +0000 (UTC) Received: (qmail 14188 invoked by uid 500); 1 Jun 2011 19:52:14 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 14144 invoked by uid 500); 1 Jun 2011 19:52:14 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 14137 invoked by uid 99); 1 Jun 2011 19:52:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jun 2011 19:52:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jun 2011 19:52:12 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2CFCE238897F; Wed, 1 Jun 2011 19:51:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1130276 - /apr/apr/branches/1.5.x/memory/unix/apr_pools.c Date: Wed, 01 Jun 2011 19:51:51 -0000 To: commits@apr.apache.org From: sf@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110601195151.2CFCE238897F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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)