Summing ps RSS across processes overcounts shared memory: shared
read-only pages like the dyld shared cache and frameworks get charged
to every process that maps them. With 300+ iOS simulator daemons all
sharing those pages, the Simulator group reported ~34 GB when its real
cost is ~5 GB.
Switch the per-process metric to physical footprint (top's MEM column,
what Activity Monitor reports), joined with ps on PID for full command
names since top truncates them. Shared pages are now charged once and
the grouped sums stay under the system app-memory total.