[luau] dumb programmer question
Jimen Ching
jching at flex.com
Thu Jan 2 18:24:01 PST 2003
On Thu, 2 Jan 2003, Charles Lockhart wrote:
>Anybody know what the fastest way to clear a buffer in C on Linux would
>be? Anything faster than
>
>for(i = 0; i < sizeofbuffer; i++)
> buffer[i] = 0;
How about using pointers so you don't need to use an index?
>For some reason I think I saw
>memcpy(&buffer, 0, sizeofbuffer);
>used somewhere once, but after a long day, that looks wierd to me.
If by weird, you mean it will crash. Yeah, this is weird. ;-)
I think you meant memset. memcpy takes two buffers.
--jc
--
Jimen Ching (WH6BRR) jching at flex.com wh6brr at uhm.ampr.org
More information about the LUAU
mailing list