use int64 for size * total_blocks to avoid overflow