[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/48962: NetBSD doesn't conform to POSIX with mlock(2) and per-process limits; returns EAGAIN instead of ENOMEM
>Synopsis: NetBSD doesn't conform to POSIX with mlock(2) and per-process
>limits; returns EAGAIN instead of ENOMEM
>Arrival-Date: Thu Jul 03 19:55:00 +0000 2014
>Originator: Garrett Cooper
EMC / Isilon Storage Division
mlock(2) in NetBSD states that per-process limits should return EAGAIN whereas
mlock(2) in POSIX states that per-process limits may (note, not a hard
requirement) return ENOMEM.
This was caught after closely examining the tests/lib/libc/sys/t_mlock.c port
to FreeBSD (
From NetBSD's mlock(2):
[EAGAIN] Locking the indicated range would exceed either the
system or per-process limit for locked memory.
The mlock() function may fail if:
Locking the pages mapped by the specified range would exceed an
implementation-defined limit on the amount of memory that the process may lock.
- Change the EAGAIN check in tests/lib/libc/sys/t_mlock.c to ENOMEM.
- Compile and re-run the tests with ATF/Kyua.
Main Index |
Thread Index |