Re: ShmemAlloc() alignment patch - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: ShmemAlloc() alignment patch
Date
Msg-id 20060714081127.GB551@svana.org
Whole thread Raw
In response to ShmemAlloc() alignment patch  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
Responses Re: ShmemAlloc() alignment patch
List pgsql-hackers
On Fri, Jul 14, 2006 at 02:50:31PM +0800, Qingqing Zhou wrote:
> In ShmemAlloc() we have:
>
>   newStart = BUFFERALIGN(newStart);
>   newSpace = (void *) (ShmemBase + newStart);
>   return newSpace;
>
> 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?

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Fwd: Three weeks left until feature freeze
Next
From: Hannu Krosing
Date:
Subject: Re: pgsql-patches considered harmful