|
Karsten Hopp |
a489da |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
a489da |
Subject: Patch 7.3.1141
|
|
Karsten Hopp |
a489da |
Fcc: outbox
|
|
Karsten Hopp |
a489da |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
a489da |
Mime-Version: 1.0
|
|
Karsten Hopp |
a489da |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
a489da |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
a489da |
------------
|
|
Karsten Hopp |
a489da |
|
|
Karsten Hopp |
a489da |
Patch 7.3.1141
|
|
Karsten Hopp |
a489da |
Problem: Win32: Check for available memory is not reliable and adds
|
|
Karsten Hopp |
a489da |
overhead.
|
|
Karsten Hopp |
a489da |
Solution: Remove mch_avail_mem(). (Mike Williams)
|
|
Karsten Hopp |
a489da |
Files: src/os_win32.c, src/os_win32.h
|
|
Karsten Hopp |
a489da |
|
|
Karsten Hopp |
a489da |
|
|
Karsten Hopp |
a489da |
*** ../vim-7.3.1140/src/os_win32.c 2013-05-06 04:21:35.000000000 +0200
|
|
Karsten Hopp |
a489da |
--- src/os_win32.c 2013-06-07 19:12:53.000000000 +0200
|
|
Karsten Hopp |
a489da |
***************
|
|
Karsten Hopp |
a489da |
*** 5048,5084 ****
|
|
Karsten Hopp |
a489da |
}
|
|
Karsten Hopp |
a489da |
|
|
Karsten Hopp |
a489da |
|
|
Karsten Hopp |
a489da |
- /*
|
|
Karsten Hopp |
a489da |
- * How much memory is available in Kbyte?
|
|
Karsten Hopp |
a489da |
- * Return sum of available physical and page file memory.
|
|
Karsten Hopp |
a489da |
- */
|
|
Karsten Hopp |
a489da |
- /*ARGSUSED*/
|
|
Karsten Hopp |
a489da |
- long_u
|
|
Karsten Hopp |
a489da |
- mch_avail_mem(int special)
|
|
Karsten Hopp |
a489da |
- {
|
|
Karsten Hopp |
a489da |
- #ifdef MEMORYSTATUSEX
|
|
Karsten Hopp |
a489da |
- PlatformId();
|
|
Karsten Hopp |
a489da |
- if (g_PlatformId == VER_PLATFORM_WIN32_NT)
|
|
Karsten Hopp |
a489da |
- {
|
|
Karsten Hopp |
a489da |
- MEMORYSTATUSEX ms;
|
|
Karsten Hopp |
a489da |
-
|
|
Karsten Hopp |
a489da |
- /* Need to use GlobalMemoryStatusEx() when there is more memory than
|
|
Karsten Hopp |
a489da |
- * what fits in 32 bits. But it's not always available. */
|
|
Karsten Hopp |
a489da |
- ms.dwLength = sizeof(MEMORYSTATUSEX);
|
|
Karsten Hopp |
a489da |
- GlobalMemoryStatusEx(&ms);
|
|
Karsten Hopp |
a489da |
- return (long_u)((ms.ullAvailPhys + ms.ullAvailPageFile) >> 10);
|
|
Karsten Hopp |
a489da |
- }
|
|
Karsten Hopp |
a489da |
- else
|
|
Karsten Hopp |
a489da |
- #endif
|
|
Karsten Hopp |
a489da |
- {
|
|
Karsten Hopp |
a489da |
- MEMORYSTATUS ms;
|
|
Karsten Hopp |
a489da |
-
|
|
Karsten Hopp |
a489da |
- ms.dwLength = sizeof(MEMORYSTATUS);
|
|
Karsten Hopp |
a489da |
- GlobalMemoryStatus(&ms);
|
|
Karsten Hopp |
a489da |
- return (long_u)((ms.dwAvailPhys + ms.dwAvailPageFile) >> 10);
|
|
Karsten Hopp |
a489da |
- }
|
|
Karsten Hopp |
a489da |
- }
|
|
Karsten Hopp |
a489da |
-
|
|
Karsten Hopp |
a489da |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
a489da |
/*
|
|
Karsten Hopp |
a489da |
* Same code as below, but with wide functions and no comments.
|
|
Karsten Hopp |
a489da |
--- 5048,5053 ----
|
|
Karsten Hopp |
a489da |
*** ../vim-7.3.1140/src/os_win32.h 2013-05-06 04:21:35.000000000 +0200
|
|
Karsten Hopp |
a489da |
--- src/os_win32.h 2013-06-07 19:14:42.000000000 +0200
|
|
Karsten Hopp |
a489da |
***************
|
|
Karsten Hopp |
a489da |
*** 80,86 ****
|
|
Karsten Hopp |
a489da |
#ifndef FEAT_GUI_W32 /* GUI works different */
|
|
Karsten Hopp |
a489da |
# define BREAKCHECK_SKIP 1 /* call mch_breakcheck() each time, it's fast */
|
|
Karsten Hopp |
a489da |
#endif
|
|
Karsten Hopp |
a489da |
- #define HAVE_AVAIL_MEM
|
|
Karsten Hopp |
a489da |
|
|
Karsten Hopp |
a489da |
#define HAVE_PUTENV /* at least Bcc 5.2 and MSC have it */
|
|
Karsten Hopp |
a489da |
|
|
Karsten Hopp |
a489da |
--- 80,85 ----
|
|
Karsten Hopp |
a489da |
*** ../vim-7.3.1140/src/version.c 2013-06-07 17:31:25.000000000 +0200
|
|
Karsten Hopp |
a489da |
--- src/version.c 2013-06-07 19:13:48.000000000 +0200
|
|
Karsten Hopp |
a489da |
***************
|
|
Karsten Hopp |
a489da |
*** 730,731 ****
|
|
Karsten Hopp |
a489da |
--- 730,733 ----
|
|
Karsten Hopp |
a489da |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
a489da |
+ /**/
|
|
Karsten Hopp |
a489da |
+ 1141,
|
|
Karsten Hopp |
a489da |
/**/
|
|
Karsten Hopp |
a489da |
|
|
Karsten Hopp |
a489da |
--
|
|
Karsten Hopp |
a489da |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
a489da |
95. Only communication in your household is through email.
|
|
Karsten Hopp |
a489da |
|
|
Karsten Hopp |
a489da |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
a489da |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
a489da |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
a489da |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|