aboutsummaryrefslogtreecommitdiff
path: root/src/memory.cpp
blob: 14c95dda5a0065d21daffe39dff3fd00e4a0a2f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
#include "axolotl/memory.hh"

void axolotl::unset(
    volatile void * buffer, std::size_t buffer_length
) {
    volatile char * pos = reinterpret_cast<volatile char *>(buffer);
    volatile char * end = pos + buffer_length;
    while (pos != end) {
        *(pos++) = 0;
    }
}