fastest way to copy hunks of memory

Guy Harris guy at auspex.auspex.com
Fri May 4 07:01:54 AEST 1990


>Who wrote it....  memcpy is a Unix System V routine (introduced in SIII
>I think),

Nope, introduced in S5; which release, I don't remember.

>and bcopy is a routine that first appeared as a generally
>available function in BSD (it may have been in V7, I disremember),

It wasn't in V7.  I don't think it was in 4.1BSD, either; as I remember,
it first showed up in 4.2BSD.

>but since that time, most newer versions of UNIX have both....

I don't think S5 has "bcopy()" until, possibly, S5R4.  4.2BSD has only
"bcopy()"; 4.3BSD has a "memcpy()", but for some unfathomable reason
they whipped up a quick-and-dirty C version that copies a byte at a
time, rather than just tweaking the assembler-language "bcopy()" to flip
the first two arguments.



More information about the Comp.unix.wizards mailing list