Syscall BSD#194
svc · unix #194
getrlimit
Retourne les limites soft et hard d'une ressource.
Prototype
int getrlimit(u_int which, struct rlimit *rlp);Retour: int
Arguments
| Name | Type | Dir | Description |
|---|---|---|---|
| which | u_int | - | |
| rlp | struct rlimit | - |
Historique des versions
| XNU tag | macOS | # |
|---|---|---|
| xnu-1456.1.26 | macOS 10.6 Snow Leopard | 194 |
| xnu-1486.2.11 | — | 194 |
| xnu-1504.15.3 | — | 194 |
| xnu-1504.3.12 | — | 194 |
| xnu-1504.7.4 | — | 194 |
| xnu-1504.9.17 | — | 194 |
| xnu-1504.9.26 | — | 194 |
| xnu-1504.9.37 | — | 194 |
Notes
Les ressources incluent RLIMIT_NOFILE, RLIMIT_STACK, RLIMIT_AS, RLIMIT_CPU, RLIMIT_CORE, etc. La hard limit plafonne ce que setrlimit() peut élever ; sur macOS le plafond noyau de RLIMIT_NOFILE est par défaut OPEN_MAX (10240), même si launchd configure souvent plus haut.
API associées
setrlimitgetrusageproc_rlimit_controlgetdtablesizegetpriority