summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2013-10-30 12:03:49 +0000
committerSimon MacMullen <simon@rabbitmq.com>2013-10-30 12:03:49 +0000
commitf47fd640dace6dc27696b566897f1b318bfe90a3 (patch)
treeee2f9d3e6a4016cfc9cff21be9d6ebfeb562f346
parentce54b28e79ad48d367852ab8bc037a0ce51af0d4 (diff)
downloadrabbitmq-server-bug25842.tar.gz
Non-Windows 32 bit platforms tend to only give you 2GB address space per process.bug25842
-rw-r--r--src/vm_memory_monitor.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vm_memory_monitor.erl b/src/vm_memory_monitor.erl
index a07f6c65..369ec655 100644
--- a/src/vm_memory_monitor.erl
+++ b/src/vm_memory_monitor.erl
@@ -221,11 +221,11 @@ get_vm_limit({win32,_OSname}) ->
8 -> 8*1024*1024*1024*1024 %% 8 TB for 64 bits 2^42
end;
-%% On a 32-bit machine, if you're using more than 4 gigs of RAM you're
+%% On a 32-bit machine, if you're using more than 2 gigs of RAM you're
%% in big trouble anyway.
get_vm_limit(_OsType) ->
case erlang:system_info(wordsize) of
- 4 -> 4*1024*1024*1024; %% 4 GB for 32 bits 2^32
+ 4 -> 2*1024*1024*1024; %% 2 GB for 32 bits 2^31
8 -> 256*1024*1024*1024*1024 %% 256 TB for 64 bits 2^48
%%http://en.wikipedia.org/wiki/X86-64#Virtual_address_space_details
end.