root/maint/gnulib/lib/resource-ext.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /* Extra functions for resource usage.
   2    Copyright (C) 2011-2021 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 <https://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.
  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);
  33 
  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);
  41 
  42 
  43 #ifdef __cplusplus
  44 }
  45 #endif
  46 
  47 #endif /* _RESOURCE_EXT_H */

/* [previous][next][first][last][top][bottom][index][help] */