Fix scoped type variables for expression type signatures
[ghc-hetmet.git] / rts / MBlock.c
index edde679..85fe02d 100644 (file)
@@ -408,7 +408,7 @@ findFreeBlocks(nat n) {
         if( (((unsigned long)it->base) & MBLOCK_MASK) == 0) { /* MBlock aligned */
             ret = (void*)it->base;
             if(it->size==required_size) {
-                prev->next=0;
+                prev->next=it->next;
                 stgFree(it);
             } else {
                 it->base += required_size;
@@ -442,7 +442,7 @@ static void
 commitBlocks(char* base, int size) {
     alloc_rec* it;
     it=allocs;
-    for( ; it!=0 && (it->base+it->size)<base; it=it->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;