/* Get number of memory blocks available in a Memory Pool.  */
uint32_t osMemoryPoolGetSpace(osMemoryPoolId_t mp_id)
/* Get number of memory blocks available in a Memory Pool.  */
uint32_t osMemoryPoolGetSpace(osMemoryPoolId_t mp_id)
{
	struct cv2_mslab *mslab = (struct cv2_mslab *)mp_id;
	if (mslab == NULL) {
		return 0;
	} else {
		return k_mem_slab_num_free_get(&mslab->z_mslab);
	}
}