[#memory_cleanse]
= memory&lowbar;cleanse
:mrdocs:

Secure overwrite a buffer (possibly containing secret data) with zero&hyphen;bytes&period; The write operation will not be optimized out by the compiler&period;

== Synopsis

Declared in `&lt;support&sol;cleanse&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
memory&lowbar;cleanse(
    void* ptr,
    size&lowbar;t len);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ptr*
| Pointer to the start of the buffer to overwrite&period;
| *len*
| Number of bytes to overwrite with zeros&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
