This is not difficult, you just need to run `htop` and perform addition of the RES column (which is in KB unless a unit is shown). Example:
USER RES▽ Command
root 70436 systemd-journald
root 14268 amazon-ssm-agent
root 13508 systemd
root 12160 systemd --user
root 10240 sshd: root@pts/0
root 9088 sshd: root [priv]
root 8944 systemd-udevd
root 8704 systemd-logind
root 8320 nix-daemon --daemon
systemd-ti 8192 systemd-timesyncd
systemd-oo 7808 systemd-oomd
root 6492 -zsh
nscd 6272 nsncd
messagebus 5888 dbus-daemon --system --address=systemd: --nofork --nopidfile -
root 5888 htop
sshd 4904 sshd: root [net]
root 4736 sshd: sshd -D -f /etc/ssh/sshd_config [listener] 1 of 10-100
root 2960 (sd-pam)
root 2816 agetty --login-program login ttyS0 --keep-baud
root 2192 dhcpcd: [privileged proxy]
dhcpcd 1680 dhcpcd: [manager] [ip4] [ip6]
dhcpcd 1468 dhcpcd: [BPF ARP] ens5 172.31.8.86
dhcpcd 1168 dhcpcd: [control proxy]
dhcpcd 1040 dhcpcd: [network proxy]