#!/bin/sh
# DF-2983 PoC run (inside the DF guest).
# NOTE: mlock(2) requires SYSCAP_RESTRICTEDROOT on DragonFly (vm_mmap.c:1030),
# so run as root.  Expected: kernel panic "phys_pager_putpage called" once the
# pagedaemon launders the dirty queue-managed pages of the OBJT_PHYS shm
# segment; use eater.c (3 GB anonymous) to supply the memory pressure.
cd "$(dirname "$0")"
./df2983 &
DFPID=$!
sleep 245
./eater &
wait
