mirror of
https://github.com/vim/vim.git
synced 2025-10-18 07:54:29 -04:00
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.
This commit is contained in:
@@ -191,16 +191,16 @@ mch_char_avail()
|
||||
}
|
||||
|
||||
/*
|
||||
* Return amount of memory still available.
|
||||
* Return amount of memory still available in Kbyte.
|
||||
*/
|
||||
long_u
|
||||
mch_avail_mem(special)
|
||||
int special;
|
||||
{
|
||||
#ifdef __amigaos4__
|
||||
return (long_u)AvailMem(MEMF_ANY);
|
||||
return (long_u)AvailMem(MEMF_ANY) >> 10;
|
||||
#else
|
||||
return (long_u)AvailMem(special ? (long)MEMF_CHIP : (long)MEMF_ANY);
|
||||
return (long_u)(AvailMem(special ? (long)MEMF_CHIP : (long)MEMF_ANY)) >> 10;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user