Question on alignment - Mailing list pgsql-hackers

From Antonin Houska
Subject Question on alignment
Date
Msg-id 2555.1554105665@localhost
Whole thread Raw
Responses Re: Question on alignment
List pgsql-hackers
In copydir.c:copy_file() I read

    /* Use palloc to ensure we get a maxaligned buffer */
    buffer = palloc(COPY_BUF_SIZE);

No data type wider than a single byte is used to access the data in the
buffer, and neither read() nor write() should require any specific alignment.
Can someone please explain why alignment matters here?

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com



pgsql-hackers by date:

Previous
From: "Jamison, Kirk"
Date:
Subject: RE: Timeout parameters
Next
From: Christoph Berg
Date:
Subject: Re: Enable data checksums by default