Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 74825 invoked from network); 12 Jul 2010 09:58:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Jul 2010 09:58:52 -0000 Received: (qmail 41657 invoked by uid 500); 12 Jul 2010 09:58:52 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 40458 invoked by uid 500); 12 Jul 2010 09:58:48 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 40443 invoked by uid 99); 12 Jul 2010 09:58:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jul 2010 09:58:47 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of apr-dev@m.gmane.org designates 80.91.229.12 as permitted sender) Received: from [80.91.229.12] (HELO lo.gmane.org) (80.91.229.12) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jul 2010 09:58:38 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OYFmB-0007dP-QY for dev@apr.apache.org; Mon, 12 Jul 2010 11:58:15 +0200 Received: from ppp118-210-58-89.lns20.adl2.internode.on.net ([118.210.58.89]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Jul 2010 11:58:15 +0200 Received: from paul by ppp118-210-58-89.lns20.adl2.internode.on.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Jul 2010 11:58:15 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: dev@apr.apache.org From: "Paul Smedley" Subject: Re: OS/2 fixes for APR Date: Mon, 12 Jul 2010 09:58:07 +0000 (UTC) Lines: 47 Message-ID: References: <4C20E36A.3030105@gmail.com> Reply-To: paul@smedley.id.au Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ppp118-210-58-89.lns20.adl2.internode.on.net User-Agent: ProNews/2 V1.60.cp125 X-Virus-Checked: Checked by ClamAV on apache.org Hi Brian, On Tue, 22 Jun 2010 16:23:06 UTC, Brian Havard wrote: > On 22/06/10 14:14, Paul Smedley wrote: > > I'd like to get my OS2 specific fixes to support a newer > > compiler/runtime than the current EMX support. > > > > What is the best way to provide the patches? Source file by source > > file to make review easier, or is one larger patch OK? > > > > Should I open a ticket for this or post the patches to the group? > > > > The normal approach is one post/patch per logical issue with an > explanation of what the patch does. OK first one - attempt to allocate shared memory in High Memory Area (ie above 512mb) by specifying OBJ_ANY flag to avoid exhausting low memory, if this call fails (due to old kernel that doesn't support the call), then revert to using low memory. --- \dev\apr-1.4.2-o\shmem\os2\shm.c 2006-08-03 19:40:30.000000000 +0845 +++ \dev\apr-1.4.2\shmem\os2\shm.c 2010-07-12 19:24:54.000000000 +0845 @@ -46,7 +46,12 @@ flags |= OBJ_GETTABLE; } - rc = DosAllocSharedMem(&(newm->memblock), name, reqsize, flags); + /* First try to allocate shared memory in HMA */ + rc = DosAllocSharedMem(&(newm->memblock), name, reqsize, flags | OBJ_ANY); + + if (rc) { + rc = DosAllocSharedMem(&(newm->memblock), name, reqsize, flags); + } if (rc) { return APR_OS2_STATUS(rc); -- Cheers, Paul.