Created
February 11, 2017 20:52
-
-
Save davisp/58307748f55e6b170140a390913b03aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(fun() -> | |
SizePids = lists:flatmap(fun(Pid) -> | |
Size = case process_info(Pid, binary) of | |
{binary, BinInfos} -> | |
lists:sum([S || {_, S, _} <- BinInfos]); | |
undefined -> | |
0 | |
end, | |
if Size == 0 -> []; true -> | |
[{Size, Pid}] | |
end | |
end, processes()), | |
lists:reverse(lists:sort(SizePids)) | |
end)(). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment