Index: heap.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/heap.cc,v retrieving revision 1.54 diff -u -p -r1.54 heap.cc --- heap.cc 31 Oct 2006 18:41:16 -0000 1.54 +++ heap.cc 17 Jul 2007 19:47:36 -0000 @@ -94,10 +94,30 @@ heap_init () break; } if (!p && in_forkee && !fork_info->handle_failure (GetLastError ())) +{ +char *end, *addr; + +for (addr = (char *)cygheap->user_heap.base, end = addr + reserve_size; addr < end; ) +{ +MEMORY_BASIC_INFORMATION info; + if ( VirtualQuery(addr, &info, sizeof(info))) + { + system_printf("baseAddr: 0x%x\n", info.BaseAddress); + system_printf("allocBase: 0x%x\n", info.AllocationBase); + system_printf("allocProt: 0x%x\n", info.AllocationProtect); + system_printf("regionSize:0x%x\n", info.RegionSize); + system_printf("state: 0x%x\n", info.State); + system_printf("protect: 0x%x\n", info.Protect); + system_printf("type: 0x%x\n", info.Type); + addr = (char *)info.BaseAddress + info.RegionSize; + } + else break; +} api_fatal ("couldn't allocate heap, %E, base %p, top %p, " "reserve_size %d, allocsize %d, page_const %d", cygheap->user_heap.base, cygheap->user_heap.top, reserve_size, allocsize, page_const); +} if (p != cygheap->user_heap.base) api_fatal ("heap allocated at wrong address %p (mapped) != %p (expected)", p, cygheap->user_heap.base); if (allocsize && !VirtualAlloc (cygheap->user_heap.base, allocsize, MEM_COMMIT, PAGE_READWRITE))