Re: ShmemAlloc() alignment patch

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: ShmemAlloc() alignment patch
Дата
Msg-id 200607141456.k6EEum417049@momjian.us
обсуждение исходный текст
Ответ на Re: ShmemAlloc() alignment patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: ShmemAlloc() alignment patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Martijn van Oosterhout <kleptog@svana.org> writes:
> > On Fri, Jul 14, 2006 at 02:50:31PM +0800, Qingqing Zhou wrote:
> >> Notice that though newStart is ALIGNOF_BUFFER, ShmemBase is not. Thus the
> >> newSpace is not aligned as we disired.
> 
> > How can ShmemBase not be aligned? Surely it's page-aligned?
> 
> That's certainly what the code expects.  I'm disinclined to apply this
> patch unless you can identify a real system where ShmemBase might not
> point to a page boundary.
> 
> (Note: in a standalone backend, the "shared memory segment" is just a
> huge malloc chunk, and so depending on your platform it might not be
> page-aligned.  I don't feel a need to add cycles to ShmemAlloc to
> optimize this case, though.  We only care about performance in the
> normal shared-memory case.)

Should we add an assert?

--  Bruce Momjian   bruce@momjian.us EnterpriseDB    http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ShmemAlloc() alignment patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ShmemAlloc() alignment patch