This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Checking that a memory area is empty
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Shérab <Sebastien dot Hinderer at ens-lyon dot org>
- Cc: libc-alpha at sourceware dot org, Samuel Thibault <Samuel dot Thibault at ens-lyon dot org>
- Date: Wed, 6 Feb 2013 09:17:37 -0500
- Subject: Re: Checking that a memory area is empty
- References: <20130206081119.GA6650@pema>
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.