Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Feb 2002 13:33:18 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Alfred Perlstein <bright@mu.org>
Cc:        Michal Mertl <mime@traveller.cz>, hackers@FreeBSD.ORG
Subject:   Re: stack alignment issues (was: unbelievable benchmark output)
Message-ID:  <20020203193318.GA6310@dan.emsphone.com>
In-Reply-To: <20020203085941.N10817@elvis.mu.org>
References:  <Pine.BSF.4.41.0202021843210.5132-100000@prg.traveller.cz> <20020203085941.N10817@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 03), Alfred Perlstein said:
> * Michal Mertl <mime@traveller.cz> [020203 08:17] wrote:
> > Several runs of the program take about the same time but the time
> > changes wildly when the executable is called differently.
> > 
> > The only thing which I can think of that can be causing this is
> > some memory alignment issue.
> 
> It sure looks like an alignment issue.  If you print the address of
> 'i' and 'j' in the attached program you can see for the fast case
> they are aligned to 8 byte boundries, but when it's slow they are at
> an address that is a multiple of 4 but not 8.
> 
> Not really sure what to make of this, anyone else know how we ought
> to fix this?

This has actually been an issue for ages, most commonly seen with
doubles.  take a look at the thread at

http://www.freebsd.org/cgi/getmsg.cgi?fetch=393691+0+/usr/local/www/db/text/2000/freebsd-current/20000507.freebsd-current

or, easier to read the entire thread:

http://groups.yahoo.com/group/freebsd-current/messages/39583?threaded=1

-- 
	Dan Nelson
	dnelson@allantgroup.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020203193318.GA6310>