Re: ShmemAlloc() alignment patch

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ShmemAlloc() alignment patch
Date: 2006-07-14 08:11:27
Message-ID: 20060714081127.GB551@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2006-07-14 10:14:16 Re: pgsql-patches considered harmful
Previous Message Peter Eisentraut 2006-07-14 07:48:16 Re: Fwd: Three weeks left until feature freeze