From: Shane P. Lee (
Date: 09/03/02

I'm curious as to why I have never seen bzero used in CircleMUD.
I recently discovered the usefulness of it and it helped me deal
with a nagging issue on a personal project.
Even if it's not compatible with many platforms, it's a great
function and could easily be duplicated for systems that don't
already have it defined in string.h.
It seems much safer than free, at least as far as I can tell, so
why wouldn't it be more widely used? For those who aren't sure what
it is, here's a quick rundown (in my own terms);

bzero(buf, sizeof(buf));
writes 0 bytes to the first argument for every instance of the second.

For a closer look, check out:

That page recommends that the function 'memset' be used instead,
check the link at the bottom for its reference.
Call me a horrible coder for not checking each option available to
me if you want, but I haven't fully looked into the advantages of
memset over bzero.

ANYWAY, back to the CircleMUD issue: Is there a particular reason
I haven't seen it used in stock circle? Could there be some monster
waiting in the background ready to eat my function because I used
bzero? Is there some sort of memory issue at stake? Because bzero
seems to be very memory-friendly. The array still exists in it's
original shape, it's just empty and waiting for new input.


Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes

   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT