From 745100db467323ee7e846a6505b44ca72e347478 Mon Sep 17 00:00:00 2001 From: Marek Majkowski Date: Thu, 28 Jan 2010 13:22:24 -0500 Subject: bug22266: make magic numbers less cryptic --- src/vm_memory_monitor.erl | 8 ++++---- 1 file 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. -- cgit v1.2.1