I was just wondering because bzero()'s purpose is
specifically to fill an area of memory with zeros.
It saves a few bytes in the binary and a few cycles
during execution, but it's not significant. (It's
even possible that the compiler optimizes a call
to memset(..., 0, ...) with constant 0 to bzero(),
but I'm not sure if common compilers are that smart.)
IIRC basically bzero is a BSD thing, and memset is C99, and I think nthe
NetBSD codebase has moved to memset and memcp from bzero and bcopy.
specifically to fill an area of memory with zeros.
It saves a few bytes in the binary and a few cycles
during execution, but it's not significant. (It's
even possible that the compiler optimizes a call
to memset(..., 0, ...) with constant 0 to bzero(),
but I'm not sure if common compilers are that smart.)
IIRC basically bzero is a BSD thing, and memset is C99, and I think nthe
NetBSD codebase has moved to memset and memcp from bzero and bcopy.