Re: MAXIMUM_ALIGNOF on Windows-32

From: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: MAXIMUM_ALIGNOF on Windows-32
Date: 2007-07-20 17:42:34
Message-ID: 2e78013d0707201042w22150b65o9a6add4956c77956@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7/20/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com> writes:
> > The MAXIMUM_ALIGNOF value is set to 8 bytes in a Windows- 32-bit
> > environment. I have very little knowledge about Windows, but at
> > the face of it, this looks strange. Any idea why is this required ?
>
> It's not entirely unreasonable. The same thing happens on HPPA,
> which is nominally a 32-bit architecture but the hardware requires
> 8-byte alignment of doubles (and maybe int64 too, I forget).
> On newer Intel hardware it'd make sense to pad to avoid misaligned
> fetches.
>
> Anyway, we detect this directly based on the C compiler's behavior,
> and you can't argue with the compiler about it. Whatever it's
> doing is right by definition.
>
>
>
Ah, that makes sense. I was confusing myself with 64-bit architectures
and alignments.

Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavan Deolasee 2007-07-20 17:44:05 Re: Memory leak in vac_update_relstats ?
Previous Message Bill Moran 2007-07-20 17:17:04 Re: 8.2.4 signal 11 with large transaction