More Profiling

Richard A. O'Keefe ok at atlas.otago.ac.nz
Wed Sep 26 01:40:11 UTC 2001


	Anyone know how to fiddle with the C-generator to get it to generate C
	code with 0-starting arrays that are aligned on a 16-byte boundry. If
	someone can do that, and help me understand how to test VM stuff, I'll
	write a the new cache.
	
Some C compilers have a #pragma that you can use to force alignment, and
GCC has its own method of doing that.  Surprisingly, for a language where
alignment is so important and so visible, C has no _portable_ means of
enforcing any particular alignment or even of detecting what alignment you
got.

A semi-portable way of getting (2**k)-byte alignment is to allocate an array
that is (2**k) or (2**k)-1 bytes bigger than you need, and then bump the
pointer up a tad.





More information about the Squeak-dev mailing list