#!/bin/sh
# root:   kldload accf_http            # filter must be registered
# unpriv: vmstat -m | grep -i accf     # baseline
#         ./race_attach 3000 6
#         vmstat -m | grep -i accf     # in-use grows by ~#wins (24B each)
gcc -O2 -pipe -o race_attach race_attach.c -lpthread || exit 1
vmstat -m | grep -i accf
./race_attach "${1:-3000}" "${2:-6}"
vmstat -m | grep -i accf
