```
#include <sys/param.h>
#include <sys/mman.h>
#include <err.h>
#include <stdint.h>
#include <stdlib.h>
int
main(int argc __unused, char **argv __unused)
{
void *v;
unsigned i;
for (i = 0; i < UINT16_MAX + 1; i++) {
v = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE,
MAP_ANON | MAP_PRIVATE, -1, 0);
if (v == MAP_FAILED)
err(1, "mmap");
}
abort();
}
```
(Testing is still a work in progress, building a kernel on this laptop is pretty slow.)
Please CC anyone you think may be qualified or interested to review this.