Re: dynamically allocating chunks from shared memory

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: dynamically allocating chunks from shared memory
Дата
Msg-id 13346.1281385106@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: dynamically allocating chunks from shared memory  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: dynamically allocating chunks from shared memory  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Aug 9, 2010 at 3:20 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> It's not portable. �That's exactly what we were looking into back when.

> Uggh, that sucks.  Can you provide any more details?

You don't really have to go further than consulting the relevant
standards, eg SUS says at
http://www.opengroup.org/onlinepubs/007908799/xsh/mmap.html
If the size of the mapped file changes after the call to mmap() as aresult of some other operation on the mapped file,
theeffect ofreferences to portions of the mapped region that correspond to addedor removed portions of the file is
unspecified.

Particular implementations might cope with such cases in useful ways, or
then again they might not.  And even if your platform does, you've set
an upper limit for the possible segment size in your mmap() call.

Further down the page, SUS also takes pains to point out that you
probably can't have an unlimited number of mapped regions, so adding
more mmap'd segments isn't a way out either.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: patch: to_string, to_array functions
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: patch: to_string, to_array functions