Re: out of memory bug on win32 platforms

2008-08-24 Fir de Conversatie Bram Moolenaar
George Reilly wrote: > 2008/8/23 Jelle Geerts <[EMAIL PROTECTED]>: > > 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 wr

Re: out of memory bug on win32 platforms

2008-08-24 Fir de Conversatie Bram Moolenaar
Jelle Geerts wrote: > 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 GlobalMemorySta

Re: out of memory bug on win32 platforms

2008-08-24 Fir de Conversatie Jelle Geerts
And heres the patch I forgot to attach. -- Jelle Geerts On Sun, Aug 24, 2008 at 8:16 PM, Jelle Geerts <[EMAIL PROTECTED]> wrote: > Hey, > > You were right and wrong. Using min() wouldn't help since we pass the > overflowed result of the addition, which could be say 1, even when there is > _much_

Re: out of memory bug on win32 platforms

2008-08-24 Fir de Conversatie Jelle Geerts
Hey, You were right and wrong. Using min() wouldn't help since we pass the overflowed result of the addition, which could be say 1, even when there is _much_ more memory available on the computer. It could happen on 64-bit systems too when the user has a lot of memory (say 64 GiB, we don't see th

out of memory bug on win32 platforms

2008-08-24 Fir de Conversatie Jelle Geerts
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 p

Re: out of memory bug on win32 platforms

2008-08-23 Fir de Conversatie George V. Reilly
2008/8/23 Jelle Geerts <[EMAIL PROTECTED]>: > 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_av