Date: Sun, 21 Jan 2007 22:41:09 +0100 From: Ivan Voras <ivoras@fer.hr> To: freebsd-arch@freebsd.org Subject: bzero & bcopy alignment Message-ID: <ep0mlv$194$1@sea.gmane.org>
next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigEAA368BA96799C3BF6F3A114 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Following recent discussion on alignment of bzero() and bcopy(), I've added some statistics collecting code to bzero() and bcopy() for practice (on a RELENG_6 box), and here are the cumulative results for argument alignment: 128: 117190 64: 46495 32: 745178 16: 35313 8: 64580 4: 131045 2: 17969 1: 25099 This is somewhat early after bootup. First number is the alignment, second argument is the number of calls that passed a pointer having the alignment (e.g. there were 131045 instances of arguments which had data aligned to 4 bytes in either bcopy or bzero). After some compiling (start of a buildkernel), the data is: 128: 341440 64: 66812 32: 1020807 16: 75574 8: 192189 4: 266904 2: 44975 1: 36411 If the data is correct, most data seem to be aligned fairly ok. --------------enigEAA368BA96799C3BF6F3A114 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFs939ldnAQVacBcgRAk0tAJ0aqms6W+MzFiqWRYKrLiZ7MuuD9gCg8Udc 2hzU0zV9TLUgjEMiWe8ocUU= =/dCH -----END PGP SIGNATURE----- --------------enigEAA368BA96799C3BF6F3A114--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ep0mlv$194$1>