Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Commit 701fc1b

Browse files
committed
Use recon_alloc:memory on Win32
Fixes #224
1 parent 50fa0ef commit 701fc1b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ define PROJECT_APP_EXTRA_KEYS
1919
]}
2020
endef
2121

22+
DEPS = recon
2223
LOCAL_DEPS = compiler syntax_tools xmerl
2324

2425
# FIXME: Use erlang.mk patched for RabbitMQ, while waiting for PRs to be

src/vm_memory_monitor.erl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ get_system_process_resident_memory({win32,_OSname}) ->
189189
%% WorkingSetSize value for the running erl.exe process. Unfortunately
190190
%% even with a moderate invocation rate of 1 ops/second that uses more
191191
%% CPU resources than some Windows users are willing to tolerate.
192-
%% See rabbitmq/rabbitmq-server#1343 for details.
193-
{ok, erlang:memory(total)};
192+
%% See rabbitmq/rabbitmq-server#1343 and rabbitmq/rabbitmq-common#224
193+
%% for details.
194+
{ok, recon_alloc:memory(allocated)};
194195

195196
get_system_process_resident_memory({unix, sunos}) ->
196197
get_ps_memory();

0 commit comments

Comments
 (0)