Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit40690c1

Browse files
committed
Add /dev/zero mention for anon mmap().
1 parent448ca1f commit40690c1

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

‎doc/TODO.detail/mmap

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,3 +482,96 @@ TIP 6: Have you searched our list archives?
482482

483483
http://archives.postgresql.org
484484

485+
From pgsql-hackers-owner+M23388@postgresql.org Mon Jun 3 17:54:43 2002
486+
Return-path: <pgsql-hackers-owner+M23388@postgresql.org>
487+
Received: from postgresql.org (postgresql.org [64.49.215.8])
488+
by candle.pha.pa.us (8.11.6/8.10.1) with ESMTP id g53LsgB05125
489+
for <pgman@candle.pha.pa.us>; Mon, 3 Jun 2002 17:54:42 -0400 (EDT)
490+
Received: from localhost.localdomain (postgresql.org [64.49.215.8])
491+
by localhost (Postfix) with ESMTP
492+
id 15421475884; Mon, 3 Jun 2002 17:54:14 -0400 (EDT)
493+
Received: from postgresql.org (postgresql.org [64.49.215.8])
494+
by postgresql.org (Postfix) with SMTP
495+
id 8B89B4761F0; Mon, 3 Jun 2002 17:53:49 -0400 (EDT)
496+
Received: from localhost.localdomain (postgresql.org [64.49.215.8])
497+
by localhost (Postfix) with ESMTP id D0F90475ECD
498+
for <pgsql-hackers@postgresql.org>; Mon, 3 Jun 2002 17:53:38 -0400 (EDT)
499+
Received: from motgate3.mot.com (motgate3.mot.com [144.189.100.103])
500+
by postgresql.org (Postfix) with ESMTP id 5CE5147593B
501+
for <pgsql-hackers@postgresql.org>; Mon, 3 Jun 2002 17:53:13 -0400 (EDT)
502+
Received: [from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate3.mot.com (motgate3 2.1) with ESMTP id OAA22235; Mon, 3 Jun 2002 14:52:44 -0700 (MST)]
503+
Received: [from pronto1.comm.mot.com (pronto1.comm.mot.com [173.6.1.22]) by pobox.mot.com (MOT-pobox 2.0) with ESMTP id OAA19166; Mon, 3 Jun 2002 14:52:59 -0700 (MST)]
504+
Received: from kovalenkoigor (idennt19534 [145.1.195.34])
505+
by pronto1.comm.mot.com (8.9.3/8.9.3) with SMTP id QAA20419;
506+
Mon, 3 Jun 2002 16:52:57 -0500 (CDT)
507+
Message-ID: <0e0a01c20b49$26e90a00$22c30191@comm.mot.com>
508+
From: "Igor Kovalenko" <Igor.Kovalenko@motorola.com>
509+
To: "Bruce Momjian" <pgman@candle.pha.pa.us>
510+
cc: "Tom Lane" <tgl@sss.pgh.pa.us>, "mlw" <markw@mohawksoft.com>,
511+
"Marc G. Fournier" <scrappy@hub.org>, <pgsql-hackers@postgresql.org>
512+
References: <200206030047.g530lZi21901@candle.pha.pa.us>
513+
Subject: Re: [HACKERS] HEADS UP: Win32/OS2/BeOS native ports
514+
Date: Mon, 3 Jun 2002 16:53:51 -0500
515+
MIME-Version: 1.0
516+
Content-Type: text/plain;
517+
charset="iso-8859-1"
518+
Content-Transfer-Encoding: 7bit
519+
X-Priority: 3
520+
X-MSMail-Priority: Normal
521+
X-Mailer: Microsoft Outlook Express 5.00.2919.6600
522+
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
523+
Precedence: bulk
524+
Sender: pgsql-hackers-owner@postgresql.org
525+
Status: OR
526+
527+
That's what Apache does. Note, on most platforms MAP_ANON is equivalent to
528+
mmmap-ing /dev/zero. Solaris for example does not provide MAP_ANON but using
529+
530+
fd=open(/dev/zero)
531+
mmap(fd, ...)
532+
close(fd)
533+
534+
works just fine.
535+
536+
----- Original Message -----
537+
From: "Bruce Momjian" <pgman@candle.pha.pa.us>
538+
To: "Igor Kovalenko" <Igor.Kovalenko@motorola.com>
539+
Cc: "Tom Lane" <tgl@sss.pgh.pa.us>; "mlw" <markw@mohawksoft.com>; "Marc G.
540+
Fournier" <scrappy@hub.org>; <pgsql-hackers@postgresql.org>
541+
Sent: Sunday, June 02, 2002 7:47 PM
542+
Subject: Re: [HACKERS] HEADS UP: Win32/OS2/BeOS native ports
543+
544+
545+
> Igor Kovalenko wrote:
546+
> > It does not have to be anonymous. POSIX also defines shm_open(same
547+
arguments
548+
> > as open) API which will create named object in whatever location
549+
corresponds
550+
> > to shared memory storage on that platform (object is then grown to
551+
needed
552+
> > size by ftruncate() and the fd is then passed to mmap). The object will
553+
> > exist in name space and can be detected by subsequent calls to
554+
shm_open()
555+
> > with same name. It is not really different from doing open(), but more
556+
> > portable (mmap() on regular files may not be supported).
557+
>
558+
> Actually, I think the best shared memory implemention would be
559+
> MAP_ANON | MAP_SHARED mmap(), which could be called from the postmaster
560+
> and passed to child processes.
561+
>
562+
> While all our platforms have mmap(), many don't have MAP_ANON, but those
563+
> that do could use it. You need MAP_ANON to prevent the shared memory
564+
> from being written to a disk file.
565+
>
566+
> --
567+
> Bruce Momjian | http://candle.pha.pa.us
568+
> pgman@candle.pha.pa.us | (610) 853-3000
569+
> + If your life is a hard drive, | 830 Blythe Avenue
570+
> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
571+
>
572+
573+
574+
---------------------------(end of broadcast)---------------------------
575+
TIP 2: you can get off all lists at once with the unregister command
576+
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
577+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp