Hello,

When allocating memory, lalloc() is called, which uses mch_avail_mem(). But
mch_avail_mem() sometimes fails. It returns the available physical memory +
available page file memory, which can sometimes wrap around 32-bits.

Also, mch_avail_mem() uses GlobalMemoryStatus() which isn't working properly on
computers with more than 4 GiB of memory installed. There is an extension
available on NT platforms 0x0500, called GlobalMemoryStatusEx(). As opposed to
GlobalMemoryStatus(), the extension works reliably with systems that have more
than 4 GiB of memory installed.

Please see the attachment for the diff file for my patch. If the comments I
have added are too wordy or someone does not like them, just remove them ;)

Thanks,
Jelle Geerts

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Attachment: os_win32.c.diff
Description: Binary data

Raspunde prin e-mail lui