ay_explicit_memset
function, a version of memset
that can escape dead code
elimination in C compilers. Licensed under 0-clause BSD License (public
domain-like license).
Useful for clearing out memory after a region of memory has been used by the program.
To use ay_explicit_memset()
function:
-
Include this project using CMake and link your targets with CMake target
explicit-memset::explicit-memset
. -
Or, copy
include/ay/explicit-memset.h
into your project and create a C file with following content (or just copysrc/ay/explicit-memset.c
and change#include
path inside it with path ofexplicit-memset.h
):
#define AY_EXPLICIT_MEMSET_IMPLEMENTATION
#include "Path to explicit-memset.h file"
Refer to include/ay/explicit-memset.h
for
usage.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as below, without any additional terms or conditions.
© 2022 arnavyc <[email protected]>
Licensed under the BSD Zero Clause License. See LICENSE file in the project root, or https://opensource.org/licenses/0BSD for full license information.
The SPDX license identifier for this project is 0BSD
.