mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-20 18:22:09 +01:00
Return 0 when detecting the amount of memory fails
Fixes bug 14802; bugfix on 0.2.5.4-alpha.
This commit is contained in:
parent
7cbdec578b
commit
9ae321db66
4
changes/bug14802
Normal file
4
changes/bug14802
Normal 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.
|
@ -3517,7 +3517,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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user