Date: Fri, 16 Jul 2010 22:55:33 +0930 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: Oliver Fromme <olli@lurza.secnetix.de> Cc: deeptech71@gmail.com, freebsd-chat@freebsd.org Subject: Re: is strlen()'s read-4-bytes-ahead a standard? Message-ID: <1DE534FE-4BCB-4524-AB6C-7E758589A9CD@gsoft.com.au> In-Reply-To: <201007160927.o6G9RU34020754@lurza.secnetix.de> References: <201007160927.o6G9RU34020754@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On 16/07/2010, at 18:57, Oliver Fromme wrote: >> Just wondering. > > There's no reason not to read the string as aligned words. > Because they're aligned, there's no risk to accidentally > hit the next VM page after the end of the string. Unless you're calling strlen on something that isn't memory (eg memory mapped device). Although that would be dumb precisely because you don't know how it's implemented. Also the compiler would warn you because your mmap'd device pointer should be declared volatile anyway.. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1DE534FE-4BCB-4524-AB6C-7E758589A9CD>
