Subject: Does NetBSD overcommit swap space?
To: None <tech-userlevel@netbsd.org>
From: Alan Barrett <apb@iafrica.com>
List: tech-userlevel
Date: 07/15/1999 11:00:16
OK, so does NetBSD overcommit, or not? Which man pages tell me?
The malloc(3) man page says
The malloc() function conforms to ANSI X3.159-1989 (``ANSI C'').
Whether or not the ANSI C standard guarantees that malloc does not
overcommit memory might be an interesting topic for language lawyers,
but it is not something that we should expect random NetBSD users to
know.
Easy stuff:
It would be nice if NetBSD's malloc(3) and brk(2) man pages stated
explicitly whether or not backing store is overcommitted, what
happens when real memory and backing store are fully committed, and
what processes can do to protect themselves against or recover from
low memory.
Speculation:
It might be useful if a process could ask the kernel something like
"Please pretend to give me 1GB of space, but note that I intend to
use it very sparsely; I promise not to touch more than 5000 512-byte
pages within the 1GB block, and I want to receive a SIGDANGER signal
if I don't keep this promise."
--apb (Alan Barrett)