updated for version 7.3.577
Problem: Size of memory does not fit in 32 bit unsigned.
Solution: Use Kbyte instead of byte. Call GlobalMemoryStatusEx() instead of
GlobalMemoryStatus() when available.
diff --git a/src/os_msdos.c b/src/os_msdos.c
index 3449d23..2d1cf73 100644
--- a/src/os_msdos.c
+++ b/src/os_msdos.c
@@ -550,15 +550,15 @@
#endif
/*
- * Return amount of memory currently available.
+ * Return amount of memory currently available in Kbyte.
*/
long_u
mch_avail_mem(int special)
{
#ifdef DJGPP
- return _go32_dpmi_remaining_virtual_memory();
+ return _go32_dpmi_remaining_virtual_memory() >> 10;
#else
- return coreleft();
+ return coreleft() >> 10;
#endif
}