mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[dos] fallback to __dpmi_get_free_memory_information
This commit is contained in:
parent
af85de2535
commit
f2fbde2de7
@ -990,7 +990,10 @@ os_get_free_mem_in_mib(void)
|
||||
int ret = __dpmi_get_memory_information(&buffer);
|
||||
|
||||
if (ret) {
|
||||
return 0;
|
||||
__dpmi_free_mem_info info;
|
||||
__dpmi_get_free_memory_information(&info);
|
||||
|
||||
return info.total_number_of_free_pages / 256;
|
||||
}
|
||||
return buffer.total_available_bytes_of_virtual_memory_client / (1024 * 1024);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user