diff options
author | Marek Majkowski <majek@lshift.net> | 2010-01-28 13:22:24 -0500 |
---|---|---|
committer | Marek Majkowski <majek@lshift.net> | 2010-01-28 13:22:24 -0500 |
commit | 745100db467323ee7e846a6505b44ca72e347478 (patch) | |
tree | 9ff71687ce94160acd937ea91a2565e0ff6bba42 | |
parent | c4dc8ed9c60990f6d6ec3ae939ffe04412e863a9 (diff) | |
download | rabbitmq-server-745100db467323ee7e846a6505b44ca72e347478.tar.gz |
bug22266: make magic numbers less cryptic
-rw-r--r-- | src/vm_memory_monitor.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vm_memory_monitor.erl b/src/vm_memory_monitor.erl index 678b75f4..7cab0c91 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. |