]> git.ipfire.org Git - thirdparty/glibc.git/blame - malloc/mcheck.c
aarch64/fpu: Add vector variants of atanh
[thirdparty/glibc.git] / malloc / mcheck.c
CommitLineData
c142eb25 1/* The mcheck() interface.
dff8da6b 2 Copyright (C) 1990-2024 Free Software Foundation, Inc.
41bdb6e2 3 This file is part of the GNU C Library.
6d52618b 4
41bdb6e2
AJ
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
6d52618b 9
41bdb6e2 10 The GNU C Library is distributed in the hope that it will be useful,
6d52618b
UD
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 13 Lesser General Public License for more details.
6d52618b 14
41bdb6e2 15 You should have received a copy of the GNU Lesser General Public
59ba27a6 16 License along with the GNU C Library; if not, see
5a82c748 17 <https://www.gnu.org/licenses/>. */
6d52618b 18
c142eb25
SP
19#if !IS_IN (libc)
20# include "mcheck-impl.c"
6d52618b 21#else
c142eb25 22# include <mcheck.h>
6d52618b
UD
23#endif
24
77e1d15a 25void
b80163bd 26mcheck_check_all (void)
8e605e78 27{
c142eb25
SP
28#if !IS_IN (libc)
29 __mcheck_checkptr (NULL);
a14f26ef 30#endif
8e605e78 31}
f0c1dedf 32
85231522
JM
33int
34mcheck (void (*func) (enum mcheck_status))
6d52618b 35{
c142eb25
SP
36#if IS_IN (libc)
37 return -1;
38#else
39 return __mcheck_initialize (func, false);
509d1b68 40#endif
c142eb25 41}
6d52618b 42
85231522
JM
43int
44mcheck_pedantic (void (*func) (enum mcheck_status))
8e605e78 45{
c142eb25
SP
46#if IS_IN (libc)
47 return -1;
48#else
49 return __mcheck_initialize (func, true);
50#endif
8e605e78
UD
51}
52
6d52618b 53enum mcheck_status
f17a4233 54mprobe (void *ptr)
6d52618b 55{
c142eb25
SP
56#if IS_IN (libc)
57 return MCHECK_DISABLED;
58#else
59 return __mcheck_checkptr (ptr);
60#endif
6d52618b 61}