"struct kinfo_proc" lets us query the maximum RSS size ever attained using "i_rusage.ru_maxrss", but there is no similar field for the maximum "ki_size" (size of all virtual memory).
Since both Windows and Linux expect this, linuxulator's sys/compat/linprocfs/linprocfs.c function linprocfs_doprocstatus() completely omits "VmPeak", while in Wine I've had to lie that "ki_size" is both the current and maximum usage.
I wonder whether the kernel even captures that statistic?
Created attachment 229620 [details]
We don't track that value, but it is not hard to add. See the attached patch.
One nit is that we count mappings with protection PROT_NONE, but not guard mappings, but for accounting purposes they should be treated the same. Handling that properly would require some extra complexity that is probably not worth it.