Mercurial > vim
changeset 4789:10673b3531eb v7.3.1141
updated for version 7.3.1141
Problem: Win32: Check for available memory is not reliable and adds
overhead.
Solution: Remove mch_avail_mem(). (Mike Williams)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 07 Jun 2013 19:17:14 +0200 |
parents | 6a602c36cb7c |
children | 5c4938ae9ef3 |
files | src/os_win32.c src/os_win32.h src/version.c |
diffstat | 3 files changed, 2 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/src/os_win32.c +++ b/src/os_win32.c @@ -5048,37 +5048,6 @@ mch_breakcheck(void) } -/* - * How much memory is available in Kbyte? - * Return sum of available physical and page file memory. - */ -/*ARGSUSED*/ - long_u -mch_avail_mem(int special) -{ -#ifdef MEMORYSTATUSEX - PlatformId(); - if (g_PlatformId == VER_PLATFORM_WIN32_NT) - { - MEMORYSTATUSEX ms; - - /* Need to use GlobalMemoryStatusEx() when there is more memory than - * what fits in 32 bits. But it's not always available. */ - ms.dwLength = sizeof(MEMORYSTATUSEX); - GlobalMemoryStatusEx(&ms); - return (long_u)((ms.ullAvailPhys + ms.ullAvailPageFile) >> 10); - } - else -#endif - { - MEMORYSTATUS ms; - - ms.dwLength = sizeof(MEMORYSTATUS); - GlobalMemoryStatus(&ms); - return (long_u)((ms.dwAvailPhys + ms.dwAvailPageFile) >> 10); - } -} - #ifdef FEAT_MBYTE /* * Same code as below, but with wide functions and no comments.