Checking that a memory area is empty
Carlos O'Donell
carlos@systemhalted.org
Wed Feb 6 14:17:00 GMT 2013
On Wed, Feb 6, 2013 at 3:11 AM, Shérab <Sebastien.Hinderer@ens-lyon.org> wrote:
> Dear all,
>
> It seems there is no function in the glibc at the moment to check
> whether a memory area is empty (contains onlyzeros).
>
> If this is correct, would it be possible to add such a function?
You are correct, we don't provide a function to check if a memory are
is all zeros.
We would not add such a function.
Why?
The GNU C Library strives to be a C library, and as such we use the ISO C11
standard as guidance for what to add in the library.
If you think that a function that searches a memory area for all
zeroes is important
then I encourage you to join your national body standards group and work on
the C standard to add this function there.
Once the function is added to the standard we will discuss
implementing it in glibc.
Does that make sense?
Cheers,
Carlos.
More information about the Libc-alpha
mailing list