help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Makefiles for 64 bit Windows


From: Andrew Makhorin
Subject: Re: [Help-glpk] Makefiles for 64 bit Windows
Date: Thu, 28 Aug 2008 18:03:36 +0400

> I had to patch glplib.h with
> #define align_boundary 16

It is unclear to me why 8-byte alignment in 64-bit environment leads
to addressing error on some platforms. It would be clear if some 16 byte
long data types were used, like long long int; however, in glpk there
are used only char, short, int, double, and (void *) basic data types,
for which 8-byte alignment is sufficient in both 32-bit and 64-bit
environments.

In particular, the AMD documentation (Chapter 3 "General Purpose
Programming") says:

"Stack Alignment. Control-transfer performance can degrade significantly
when the stack pointer is not aligned properly. Stack pointers should be
word aligned in 16-bit segments, doubleword aligned in 32-bit segments,
and quadword aligned in 64-bit mode."

i.e. 8-byte (quadword) alignment seems to be sufficient.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]