From 91ed2f62a4d8e7f3aafc4cb6bb0d58d0273830fb Mon Sep 17 00:00:00 2001 From: Simon MacMullen Date: Wed, 19 Sep 2012 10:40:21 +0100 Subject: Simplify --- src/rabbit.erl | 4 +--- 1 file changed, 1 insertion(+), 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]); -- cgit v1.2.1