Article View: news.software.nn
Article #7871Re: memmove or bcopy
From: Bill Wohler
Date: Fri, 23 Aug 1996 00:00
Date: Fri, 23 Aug 1996 00:00
23 lines
1731 bytes
1731 bytes
Michael T Pins <mtpins@icaen.uiowa.edu> writes: > What I plan on doing is changing all the bcopy's to memmove's, with an > ifdef for systems that don't support memmove. I don't think you should do that! First, tell me if bcopy() allows the strings to overlap. If so, then it's OK; otherwise, you may incur a performance hit as memmove() does allow the strings to overlap and may have be slower than memcpy() which does not allow the strings to overlap. I would assume that this would make memcpy() faster and what you'd want to use in general, unless your strings overlapped. Nonetheless, I laud your effort to make the code more Posix compliant. I would suspect that you'll probably find the mem*() routines missing from many BSD systems. Bill Wohler <wohler@newt.com> ph: +1-415-854-1857 fax: +1-415-854-3195 Say it with MIME. Maintainer of comp.mail.mh and news.software.nn FAQs. If you're passed on the right, you're in the wrong lane.
Technical Details
Message-ID:
<199608232120.OAA26006@uluru.worldtalk.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.mbox.zip!not-for-mailReferences:
<4vgd0k$aso@server05.icaen.uiowa.edu> <4vghml$feg@hammer.msfc.nasa.gov> <4vgkup$bqb@server05.icaen.uiowa.edu>Show Full Headers
Complete Article Headers
Message-ID: <199608232120.OAA26006@uluru.worldtalk.com> Subject: Re: memmove or bcopy Date: Fri, 23 Aug 1996 00:00:00 +0000 From: Bill Wohler <wohler@uluru.worldtalk.com> References: <4vgd0k$aso@server05.icaen.uiowa.edu> <4vghml$feg@hammer.msfc.nasa.gov> <4vgkup$bqb@server05.icaen.uiowa.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.mbox.zip!not-for-mail X-Deja-AN: 176044239 X-mail2news-path: uluru.worldtalk.com!uluru.worldtalk.com X-nntp-posting-host: uluru.worldtalk.com Newsgroups: news.software.nn X-mailer: MH [Version 6.8.4]; mh-e [Version 5.0.2]