Mercurial > hg > octave-kai > gnulib-hg
annotate lib/resource-ext.h @ 14227:8bb45aca6841
get-rusage-as: Allow for easier testing.
* lib/resource-ext.h (get_rusage_as): Add comment.
* lib/get-rusage-as.c (get_rusage_as_via_setrlimit): Define always.
(main): New function for interactive testing.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Wed, 26 Jan 2011 02:11:18 +0100 |
parents | ae1f97981b87 |
children | 381ce0fff2fb |
rev | line source |
---|---|
14175 | 1 /* Extra functions for resource usage. |
2 Copyright (C) 2011 Free Software Foundation, Inc. | |
3 Written by Bruno Haible <bruno@clisp.org>, 2011. | |
4 | |
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. | |
9 | |
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. | |
14 | |
15 You should have received a copy of the GNU General Public License | |
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
17 | |
18 #ifndef _RESOURCE_EXT_H | |
19 #define _RESOURCE_EXT_H | |
20 | |
21 #include <stdint.h> | |
22 | |
23 #ifdef __cplusplus | |
24 extern "C" { | |
25 #endif | |
26 | |
27 | |
28 /* Returns the amount of address space currently in use by the current | |
29 process, or zero if unknown. | |
14227
8bb45aca6841
get-rusage-as: Allow for easier testing.
Bruno Haible <bruno@clisp.org>
parents:
14175
diff
changeset
|
30 This is the quantity which is limited by setrlimit(RLIMIT_AS,...). |
8bb45aca6841
get-rusage-as: Allow for easier testing.
Bruno Haible <bruno@clisp.org>
parents:
14175
diff
changeset
|
31 Note: This function always returns zero on OpenBSD and AIX. */ |
14175 | 32 extern uintptr_t get_rusage_as (void); |
33 | |
34 | |
35 #ifdef __cplusplus | |
36 } | |
37 #endif | |
38 | |
39 #endif /* _RESOURCE_EXT_H */ |