From ebfefc7172495f442dcbc48a25cf3e0b94c8e853 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Wed, 6 Sep 2006 11:27:50 +0000 Subject: [PATCH] Fix the Windows "VirtualAlloc MEM_COMMIT failed" bug We had base=01100000 size=1048576 size_delta=0 it->size=2097152 it->base=00F00000 base-it->base=00200000 in commitBlocks. Esa Ilari Vuokko identified this inequality test as the cause. --- rts/MBlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rts/MBlock.c b/rts/MBlock.c index c886fd5..85fe02d 100644 --- a/rts/MBlock.c +++ b/rts/MBlock.c @@ -442,7 +442,7 @@ static void commitBlocks(char* base, int size) { alloc_rec* it; it=allocs; - for( ; it!=0 && (it->base+it->size)next ) {} + for( ; it!=0 && (it->base+it->size)<=base; it=it->next ) {} for( ; it!=0 && size>0; it=it->next ) { int size_delta; void* temp; -- 1.7.10.4