summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarek Majkowski <majek@lshift.net>2010-01-28 13:22:24 -0500
committerMarek Majkowski <majek@lshift.net>2010-01-28 13:22:24 -0500
commit63a1de1021781266eb39a786872003c365797958 (patch)
tree9ff71687ce94160acd937ea91a2565e0ff6bba42 /src
parent3e22803b7d0ae10b10b528bf6d777774ea05ca9f (diff)
downloadrabbitmq-server-git-63a1de1021781266eb39a786872003c365797958.tar.gz
bug22266: make magic numbers less cryptic
Diffstat (limited to 'src')
-rw-r--r--src/vm_memory_monitor.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vm_memory_monitor.erl b/src/vm_memory_monitor.erl
index 678b75f49c..7cab0c9197 100644
--- a/src/vm_memory_monitor.erl
+++ b/src/vm_memory_monitor.erl
@@ -216,16 +216,16 @@ start_timer(Timeout) ->
%% Windows has 2GB and 8TB of address space for 32 and 64 bit accordingly.
get_vm_limit({win32,_OSname}) ->
case erlang:system_info(wordsize) of
- 4 -> 2147483648; %% 2 GB for 32 bits 2^31
- 8 -> 8796093022208 %% 8 TB for 64 bits 2^42
+ 4 -> 2*1024*1024*1024; %% 2 GB for 32 bits 2^31
+ 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 2 gigs of RAM you're
%% in big trouble anyway.
get_vm_limit(_OsType) ->
case erlang:system_info(wordsize) of
- 4 -> 4294967296; %% 4 GB for 32 bits 2^32
- 8 -> 281474976710656 %% 256 TB for 64 bits 2^48
+ 4 -> 4*1024*1024*1024; %% 4 GB for 32 bits 2^32
+ 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.