You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Paul Smedley <pa...@despamsmedley.id.au> on 2010/07/12 11:58:07 UTC
Re: OS/2 fixes for APR
Hi Brian,
On Tue, 22 Jun 2010 16:23:06 UTC, Brian Havard
<br...@gmail.com> 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.