add alloc_block() and free_block().