I'm not certain that all the BSDs share a similar OOM killer approach. It would be interesting to see if they have diverged.
edit: after some quick googling the OOM killer code on FreeBSD is certainly different than other BSDs because of changes needed to better cooperate with ZFS. Also, EMC has been working on code in this area too:
/*
* If we are critically low on one of RAM or swap and low on
* the other, kill the largest process. However, we avoid
* doing this on the first pass in order to give ourselves a
* chance to flush out dirty vnode-backed pages and to allow
* active pages to be moved to the inactive queue and reclaimed.
*/
edit: after some quick googling the OOM killer code on FreeBSD is certainly different than other BSDs because of changes needed to better cooperate with ZFS. Also, EMC has been working on code in this area too:
https://wiki.freebsd.org/AvgPageoutAlgorithm
Memory classes here are well described: https://wiki.freebsd.org/Memory
Virtual memory system: https://www.freebsd.org/doc/en/books/arch-handbook/vm.html
Code: https://svnweb.freebsd.org/base/head/sys/vm/vm_pageout.c?vie...
Lots of good comments in there.