Branch: Tag:

2021-09-10

2021-09-10 17:01:16 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Runtime: Fix typo in ba_walk().

Only the first block of each page was actually walked
by ba_walk(). This caused eg dmalloc_unregister_all()
to not actually unregister all blocks, which triggered
failures if/when any blocks were reused. Similar issues
were likely for the other code that uses ba_walk().

597:    }    break;    } else if (free_block == BA_ONE) { -  /* all consecutive blocks are free, so we are dont */ +  /* all consecutive blocks are free, so we are done. */    break;    }   
623:    cb(&it, data);    }    -  it.cur = (char*)it.end + it.l.block_size; +  it.cur = (char*)it.cur + it.l.block_size;    }       /* if the callback throws, this will never happen */