exp2l: Work around a NetBSD 10.0/i386 bug.
[gnulib.git] / lib / resource-ext.h
blobe2a7b03277694928b76bffef802a03e93f740ddd
1 /* Extra functions for resource usage.
2 Copyright (C) 2011-2024 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2011.
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program 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
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
18 #ifndef _RESOURCE_EXT_H
19 #define _RESOURCE_EXT_H
21 #include <stdint.h>
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
28 /* Returns the amount of address space currently in use by the current
29 process, or zero if unknown.
30 This is the quantity which is limited by setrlimit(RLIMIT_AS,...).
31 Note: This function always returns zero on AIX. */
32 extern uintptr_t get_rusage_as (void);
34 /* Returns the size of the data segment, or zero if unknown.
35 This is the quantity which is limited by setrlimit(RLIMIT_DATA,...).
36 Note: This function always returns zero on HP-UX 11.00.
37 Note: The total size of all malloc()ed memory is bounded by the size of
38 the data segment only on the following platforms:
39 FreeBSD, AIX, HP-UX 11.23 and newer, IRIX, OSF/1, Solaris, BeOS, Haiku. */
40 extern uintptr_t get_rusage_data (void);
43 #ifdef __cplusplus
45 #endif
47 #endif /* _RESOURCE_EXT_H */