x86_64: Add expm1 with FMA
[glibc.git] / include / set-freeres.h
blob866d0e371756dc50f2cc607af0fc278349ad13f8
1 /* Macros for internal resource Freeing Hooks.
2 Copyright (C) 2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
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.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
19 #ifndef _SET_FREERES_H
20 #define _SET_FREERES_H 1
22 #include <shlib-compat.h>
23 #include <printf.h>
24 #include <time.h>
25 #include <resolv/resolv-internal.h>
27 /* Resource Freeing Hooks:
29 Normally a process exits and the OS cleans up any allocated
30 memory. However, when tooling like mtrace or valgrind is monitoring
31 the process we need to free all resources that are part of the
32 process in order to provide the consistency required to track
33 memory leaks.
35 A single public API exists and is __libc_freeres, and this is used
36 by applications like valgrind to free resources.
38 Each free routines must be explicit listed below. */
40 /* From libc.so. */
41 extern void __dl_libc_freemem (void) attribute_hidden;
42 extern void __hdestroy (void) attribute_hidden;
43 extern void __gconv_cache_freemem (void) attribute_hidden;
44 extern void __gconv_conf_freemem (void) attribute_hidden;
45 extern void __gconv_db_freemem (void) attribute_hidden;
46 extern void __gconv_dl_freemem (void) attribute_hidden;
47 extern void __intl_freemem (void) attribute_hidden;
48 extern void __libio_freemem (void) attribute_hidden;
49 extern void __libc_fstab_freemem (void) attribute_hidden;
50 extern void __nscd_gr_map_freemem (void) attribute_hidden;
51 extern void __nscd_hst_map_freemem (void) attribute_hidden;
52 extern void __nscd_pw_map_freemem (void) attribute_hidden;
53 extern void __nscd_serv_map_freemem (void) attribute_hidden;
54 extern void __nscd_group_map_freemem (void) attribute_hidden;
55 extern void __libc_regcomp_freemem (void) attribute_hidden;
56 extern void __libc_atfork_freemem (void) attribute_hidden;
57 extern void __libc_resolv_conf_freemem (void) attribute_hidden;
58 extern void __res_thread_freeres (void) attribute_hidden;
59 extern void __libc_printf_freemem (void) attribute_hidden;
60 extern void __libc_fmtmsg_freemem (void) attribute_hidden;
61 extern void __libc_setenv_freemem (void) attribute_hidden;
62 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_31)
63 extern void __rpc_freemem (void) attribute_hidden;
64 extern void __rpc_thread_destroy (void) attribute_hidden;
65 #endif
66 extern void __libc_getaddrinfo_freemem (void) attribute_hidden;
67 extern void __libc_tzset_freemem (void) attribute_hidden;
68 extern void __libc_localealias_freemem (void) attribute_hidden;
69 extern void __libc_getutent_freemem (void) attribute_hidden;
70 extern void __libc_getutline_freemem (void) attribute_hidden;
71 /* From nss/nss_module.c */
72 extern void __nss_module_freeres (void) attribute_hidden;
73 /* From nss/nss_action.c */
74 extern void __nss_action_freeres (void) attribute_hidden;
75 /* From nss/nss_database.c */
76 extern void __nss_database_freeres (void) attribute_hidden;
77 /* From libio/genops.c */
78 extern int _IO_cleanup (void) attribute_hidden;;
79 /* From dlfcn/dlerror.c */
80 extern void __libc_dlerror_result_free (void) attribute_hidden;
82 /* From either libc.so or libpthread.so */
83 extern void __libpthread_freeres (void) attribute_hidden;
84 /* From either libc.so or libanl.so */
85 #if PTHREAD_IN_LIBC
86 extern void __gai_freemem (void) attribute_hidden;
87 /* From either libc.so or librt.so */
88 extern void __aio_freemem (void) attribute_hidden;
89 #endif
91 /* From libc.so */
92 extern char * __libc_fgetgrent_freemem_ptr attribute_hidden;
93 extern char * __libc_fgetsgent_freeres_ptr attribute_hidden;
94 extern char * __libc_getnetgrent_freemem_ptr attribute_hidden;
95 extern char * __libc_rcmd_freemem_ptr attribute_hidden;
96 extern char * __libc_rexec_freemem_ptr attribute_hidden;
97 extern void * __libc_mntent_freemem_ptr attribute_hidden;
98 extern char * __libc_fgetpwent_freemem_ptr attribute_hidden;
99 extern struct netaddr * __libc_resolv_res_hconf_freemem_ptr attribute_hidden;
100 extern char * __libc_fgetspent_freemem_ptr attribute_hidden;
101 extern __time64_t * __libc_tzfile_freemem_ptr attribute_hidden;
102 extern char * __libc_getnameinfo_freemem_ptr attribute_hidden;
103 extern struct utmp * __libc_getutent_freemem_ptr attribute_hidden;
104 extern struct utmp * __libc_getutid_freemem_ptr attribute_hidden;
105 extern struct utmp * __libc_getutline_freemem_ptr attribute_hidden;
106 extern printf_arginfo_size_function ** __libc_reg_printf_freemem_ptr
107 attribute_hidden;
108 extern printf_va_arg_function ** __libc_reg_type_freemem_ptr
109 attribute_hidden;
110 /* From nss/getXXbyYY.c */
111 extern char * __libc_getgrgid_freemem_ptr attribute_hidden;
112 extern char * __libc_getgrnam_freemem_ptr attribute_hidden;
113 extern char * __libc_getpwnam_freemem_ptr attribute_hidden;
114 extern char * __libc_getpwuid_freemem_ptr attribute_hidden;
115 extern char * __libc_getspnam_freemem_ptr attribute_hidden;
116 extern char * __libc_getaliasbyname_freemem_ptr attribute_hidden;
117 extern char * __libc_gethostbyaddr_freemem_ptr attribute_hidden;
118 extern char * __libc_gethostbyname_freemem_ptr attribute_hidden;
119 extern char * __libc_gethostbyname2_freemem_ptr attribute_hidden;
120 extern char * __libc_getnetbyaddr_freemem_ptr attribute_hidden;
121 extern char * __libc_getnetbyname_freemem_ptr attribute_hidden;
122 extern char * __libc_getprotobynumber_freemem_ptr attribute_hidden;
123 extern char * __libc_getprotobyname_freemem_ptr attribute_hidden;
124 extern char * __libc_getrpcbyname_freemem_ptr attribute_hidden;
125 extern char * __libc_getrpcbynumber_freemem_ptr attribute_hidden;
126 extern char * __libc_getservbyname_freemem_ptr attribute_hidden;
127 extern char * __libc_getservbyport_freemem_ptr attribute_hidden;
128 /* From nss/getXXent.c */
129 extern char * __libc_getgrent_freemem_ptr attribute_hidden;
130 extern char * __libc_getpwent_freemem_ptr attribute_hidden;
131 extern char * __libc_getspent_freemem_ptr attribute_hidden;
132 extern char * __libc_getaliasent_freemem_ptr attribute_hidden;
133 extern char * __libc_gethostent_freemem_ptr attribute_hidden;
134 extern char * __libc_getnetent_freemem_ptr attribute_hidden;
135 extern char * __libc_getprotoent_freemem_ptr attribute_hidden;
136 extern char * __libc_getrpcent_freemem_ptr attribute_hidden;
137 extern char * __libc_getservent_freemem_ptr attribute_hidden;
138 /* From misc/efgcvt-template.c */
139 extern char * __libc_efgcvt_freemem_ptr attribute_hidden;
140 extern char * __libc_qefgcvt_freemem_ptr attribute_hidden;
142 #endif