Re: is strlen()'s read-4-bytes-ahead a standard?

看板FB_chat作者時間15年前 (2010/07/16 21:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串7/8 (看更多)
On 16/07/2010, at 18:57, Oliver Fromme wrote: >> Just wondering. >=20 > 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-unsubscribe@freebsd.org"
文章代碼(AID): #1CG5zI_8 (FB_chat)
討論串 (同標題文章)
文章代碼(AID): #1CG5zI_8 (FB_chat)