Mercurial > hg > octave-kai > gnulib-hg
annotate lib/resource-ext.h @ 14228:381ce0fff2fb
New module 'get-rusage-data'.
* lib/resource-ext.h (get_rusage_data): New declaration.
* lib/get-rusage-data.c: New file.
* modules/get-rusage-data: New file.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Wed, 26 Jan 2011 12:56:22 +0100 |
parents | 8bb45aca6841 |
children | 6b8b94f919ce |
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 | |
14228
381ce0fff2fb
New module 'get-rusage-data'.
Bruno Haible <bruno@clisp.org>
parents:
14227
diff
changeset
|
34 /* Returns the size of the data segment, or zero if unknown. |
381ce0fff2fb
New module 'get-rusage-data'.
Bruno Haible <bruno@clisp.org>
parents:
14227
diff
changeset
|
35 This is the quantity which is limited by setrlimit(RLIMIT_DATA,...). |
381ce0fff2fb
New module 'get-rusage-data'.
Bruno Haible <bruno@clisp.org>
parents:
14227
diff
changeset
|
36 Note: This function always returns zero on HP-UX 11.00. |
381ce0fff2fb
New module 'get-rusage-data'.
Bruno Haible <bruno@clisp.org>
parents:
14227
diff
changeset
|
37 Note: The total size of all malloc()ed memory is bounded by the size of |
381ce0fff2fb
New module 'get-rusage-data'.
Bruno Haible <bruno@clisp.org>
parents:
14227
diff
changeset
|
38 the data segment only on the following platforms: |
381ce0fff2fb
New module 'get-rusage-data'.
Bruno Haible <bruno@clisp.org>
parents:
14227
diff
changeset
|
39 FreeBSD, AIX, HP-UX 11.23 and newer, IRIX, OSF/1, Solaris, BeOS, Haiku. */ |
381ce0fff2fb
New module 'get-rusage-data'.
Bruno Haible <bruno@clisp.org>
parents:
14227
diff
changeset
|
40 extern uintptr_t get_rusage_data (void); |
381ce0fff2fb
New module 'get-rusage-data'.
Bruno Haible <bruno@clisp.org>
parents:
14227
diff
changeset
|
41 |
14175 | 42 |
43 #ifdef __cplusplus | |
44 } | |
45 #endif | |
46 | |
47 #endif /* _RESOURCE_EXT_H */ |