Skip to content

Instantly share code, notes, and snippets.

@blt blt/ohlord.erl
Created Sep 12, 2014

Embed
What would you like to do?
lists:reverse(lists:sort([{(MemWords * erlang:system_info(wordsize)) / math:pow(1000, 2), Tables, Pid} || {Pid, Tables, MemWords} <- lists:foldl(fun({Pid, Tab, MemWords}, [{Pid, TabList, TotMemWords} | Rest]) -> [{Pid, [Tab | TabList], TotMemWords + MemWords} | Rest]; (Elem, Acc) -> [Elem | Acc] end, [], lists:sort([{ets:info(E, owner), E, ets:info(E, memory)} || E <- ets:all()]))])).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.