- DIV_ROUND_UP(cbm_size(), CLUSTER_SIZE(sb)) +
- DIV_ROUND_UP(uct_size(), CLUSTER_SIZE(sb)) +
- DIV_ROUND_UP(rootdir_size(), CLUSTER_SIZE(sb));
- size_t bitmap_size = DIV_ROUND_UP(allocated_clusters, CHAR_BIT);
- uint8_t* bitmap = malloc(bitmap_size);
+ DIV_ROUND_UP(cbm.get_size(), get_cluster_size()) +
+ DIV_ROUND_UP(uct.get_size(), get_cluster_size()) +
+ DIV_ROUND_UP(rootdir.get_size(), get_cluster_size());
+ size_t bitmap_size = ROUND_UP(allocated_clusters, CHAR_BIT);
+ bitmap_t* bitmap = malloc(BMAP_SIZE(bitmap_size));