NAME
KS_valgrind_is_running,
KS_valgrind_make_mem_noaccess,
KS_valgrind_make_mem_undefined,
KS_valgrind_make_mem_defined —
Valgrind utility functions
SYNOPSIS
#include
<libks/valgrind.h>
int
KS_valgrind_is_running(void);
int
KS_valgrind_make_mem_noaccess(const
void *ptr, size_t
len);
int
KS_valgrind_make_mem_undefined(const
void *ptr, size_t
len);
int
KS_valgrind_make_mem_defined(const
void *ptr, size_t
len);
DESCRIPTION
The Valgrind API provides functions used to interact with Valgrind.
The
KS_valgrind_is_running()
function can be used to determine if running under Valgrind or not.
The
KS_valgrind_make_mem_noaccess()
function instructs Valgrind to mark the address range [ptr, ptr + len) as
inaccessible.
The
KS_valgrind_make_mem_undefined()
function instructs Valgrind to mark the address range [ptr, ptr + len) as
accessible and containing uninitialized data.
The
KS_valgrind_make_mem_defined()
function instructs Valgrind to mark the address range [ptr, ptr + len) as
accessible and containing initialized data.
RETURN VALUES
The KS_valgrind_make_mem_noaccess(),
KS_valgrind_make_mem_undefined() and
KS_valgrind_make_mem_defined() functions returns
non-zero while running under Valgrind and zero otherwise.
AUTHORS
Anton Lindqvist <anton@basename.se>