diff src/os_msdos.c @ 3634:286ba0251c0a v7.3.577

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.
author Bram Moolenaar <bram@vim.org>
date Fri, 29 Jun 2012 15:51:30 +0200
parents fd4224d9ee09
children e6d8b44065bc
line wrap: on
line diff
--- a/src/os_msdos.c
+++ b/src/os_msdos.c
@@ -550,15 +550,15 @@ mch_update_cursor(void)
 #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
 }