bitmap allocation fix

fix cache_mark offset bug and change cache_unmark according to previous changes)