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 _______________________________________________ freebsd-chat@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-chat To unsubscribe, send any mail to "freebsd-chat-unsubscr...@freebsd.org"