Re: BUG #2406: Not all systems support SHM_SHARE_MMU
От | Tom Lane |
---|---|
Тема | Re: BUG #2406: Not all systems support SHM_SHARE_MMU |
Дата | |
Msg-id | 19004.1145976405@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BUG #2406: Not all systems support SHM_SHARE_MMU ("Paul van der Zwan" <paul.vanderzwan@sun.com>) |
Ответы |
Re: BUG #2406: Not all systems support SHM_SHARE_MMU
|
Список | pgsql-bugs |
Paul van der Zwan <Paul.Vanderzwan@Sun.COM> writes: > AFAIK getpagesizes() appeared in 2001 so that probably means it is > missing in anything before Solaris 9. We could handle this without relying on getpagesizes() by just trying and falling back: #ifdef SHM_SHARE_MMU memAddress = shmat(shmid, addr, SHM_SHARE_MMU); if (memAddress == (void *) -1 && errno == EINVAL) memAddress = shmat(shmid, addr, 0); #else memAddress = shmat(shmid, addr, 0); #endif However, I would argue that a system is pretty broken if it exposes the SHM_SHARE_MMU #define and then rejects it at runtime. > I'll see if I can get the x86 experts here to have a look at it... I think either Solaris/x86 should not expose this #define, or it should silently ignore the bit at runtime. AFAICS, SHM_SHARE_MMU has no guaranteed semantic effect anyway, it's just a performance hint; so ignoring it on platforms that can't handle it is reasonable. regards, tom lane
В списке pgsql-bugs по дате отправления: