Re: HEADS UP: Win32/OS2/BeOS native ports - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: HEADS UP: Win32/OS2/BeOS native ports
Date
Msg-id 200206030047.g530lZi21901@candle.pha.pa.us
Whole thread Raw
In response to Re: HEADS UP: Win32/OS2/BeOS native ports  ("Igor Kovalenko" <Igor.Kovalenko@motorola.com>)
List pgsql-hackers
Igor Kovalenko wrote:
> It does not have to be anonymous. POSIX also defines shm_open(same arguments
> as open) API which will create named object in whatever location corresponds
> to shared memory storage on that platform (object is then grown to needed
> size by ftruncate() and the fd is then passed to mmap). The object will
> exist in name space and can be detected by subsequent calls to shm_open()
> with same name. It is not really different from doing open(), but more
> portable (mmap() on regular files may not be supported).

Actually, I think the best shared memory implemention would be
MAP_ANON | MAP_SHARED mmap(), which could be called from the postmaster
and passed to child processes.

While all our platforms have mmap(), many don't have MAP_ANON, but those
that do could use it.  You need MAP_ANON to prevent the shared memory
from being written to a disk file.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Compilation failed when --with-recode specified (patch)
Next
From: Bruce Momjian
Date:
Subject: Re: HEADS UP: Win32/OS2/BeOS native ports