Re: [HACKERS] Memory mapping (Was: Safe/Fast I/O ...)

From: "Matthew N(dot) Dodd" <winter(at)jurai(dot)net>
To: Michal Mosiewicz <mimo(at)interdata(dot)com(dot)pl>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Memory mapping (Was: Safe/Fast I/O ...)
Date: 1998-04-15 02:13:54
Message-ID: Pine.BSF.3.96.980414221111.7475L-100000@sasami.jurai.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 15 Apr 1998, Michal Mosiewicz wrote:
> isolated from files it's possible to close some descriptors without
> throwing buffers. However it seems (tried it) that memory mapping works
> even after a file descriptor is closed. So, is this possible to cross
> the limit of open files by using memory mapping? Or maybe the descriptor
> remains open until munmap call? Or maybe it's just a Linux feature?

Nope, thats how it works.

A good friend of mine used this in some modifications to INN (probably in
INN -current right now).

Sending an article involved opening the file, mmapping it, closing the fd,
writing the mapped area and munmap-ing.

Its pretty slick.

Be careful of the file changing under you.

/*
Matthew N. Dodd | A memory retaining a love you had for life
winter(at)jurai(dot)net | As cruel as it seems nothing ever seems to
http://www.jurai.net/~winter | go right - FLA M 3.1:53
*/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-04-15 02:24:23 Re: [HACKERS] Memory mapping (Was: Safe/Fast I/O ...)
Previous Message Ryan Kirkpatrick 1998-04-15 01:45:49 Re: [HACKERS] Linux/Alpha and pgsql....