add bitmap write functions
Merge branch 'bitmap_deallocate'