Merge remote-tracking branch 'sysrqb/bug14802_025'

This commit is contained in:
Nick Mathewson 2015-02-09 22:39:55 -08:00
commit 5c820def99
2 changed files with 5 additions and 1 deletions

4
changes/bug14802 Normal file
View File

@ -0,0 +1,4 @@
o Minor bugfix:
- Make an educated guess about how much memory the system has when our
detection functionality fails on some operating system. Fixes bug 14802;
bugfix on 0.2.5.4-alpha.

View File

@ -3161,7 +3161,7 @@ get_total_system_memory_impl(void)
size_t len = sizeof(memsize);
int mib[2] = {CTL_HW, HW_USERMEM};
if (sysctl(mib,2,&memsize,&len,NULL,0))
return -1;
return 0;
return memsize;