* cygheap.cc (_csbrk): Don't request zero bytes from VirtualAlloc,
as windows treats that as an invalid parameter and returns an error.
This commit is contained in:
parent
4b93ac1f7f
commit
3623cfa399
@ -1,3 +1,8 @@
|
||||
2007-12-11 Dave Korn <dave.korn@artimi.com>
|
||||
|
||||
* cygheap.cc (_csbrk): Don't request zero bytes from VirtualAlloc,
|
||||
as windows treats that as an invalid parameter and returns an error.
|
||||
|
||||
2007-12-11 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* localtime.cc (tzset): Call tzsetwall only if it hasn't been
|
||||
|
@ -129,7 +129,7 @@ _csbrk (int sbs)
|
||||
newbase = _cygheap_end;
|
||||
|
||||
DWORD adjsbs = allocsize ((char *) cygheap_max - newbase);
|
||||
if (!VirtualAlloc (newbase, adjsbs, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE))
|
||||
if (adjsbs && !VirtualAlloc (newbase, adjsbs, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE))
|
||||
{
|
||||
MEMORY_BASIC_INFORMATION m;
|
||||
if (!VirtualQuery (newbase, &m, sizeof m))
|
||||
|
Loading…
Reference in New Issue
Block a user