summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-09-19 10:40:21 +0100
committerSimon MacMullen <simon@rabbitmq.com>2012-09-19 10:40:21 +0100
commit91ed2f62a4d8e7f3aafc4cb6bb0d58d0273830fb (patch)
tree7734e5dc05d3f25942a06c6068d840e19a85e828
parent0271cf3b0a527ef7a9298f1e1c5d1a047b3bd9cf (diff)
downloadrabbitmq-server-91ed2f62a4d8e7f3aafc4cb6bb0d58d0273830fb.tar.gz
Simplify
-rw-r--r--src/rabbit.erl4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index 66e459e9..eaf11cfd 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -774,9 +774,7 @@ memory() ->
{other_system, System - ETS - Atom - Bin - Code}].
sum_proc_memory(Pids) ->
- lists:foldl(
- fun (Pid, Mem) -> Mem + element(2, process_info(Pid, memory)) end,
- 0, Pids).
+ lists:sum([Mem || P <- Pids, {memory, Mem} <- [process_info(P, memory)]]).
pids(#amqqueue{pid = Pid, slave_pids = undefined}) ->
local_pids([Pid]);