[Kernel] Remove memory ops when SLAB and module enable

This commit is contained in:
Bernard Xiong
2018-06-10 18:46:11 +08:00
parent 564df04da1
commit df64a297ab
6 changed files with 10 additions and 86 deletions
+2 -8
View File
@@ -387,14 +387,8 @@ void rt_object_delete(rt_object_t object)
/* unlock interrupt */
rt_hw_interrupt_enable(temp);
#if defined(RT_USING_MODULE) && defined(RT_USING_SLAB)
if (object->flag & RT_OBJECT_FLAG_MODULE)
rt_module_free((rt_module_t)object->module_id, object);
else
#endif
/* free the memory of object */
RT_KERNEL_FREE(object);
/* free the memory of object */
RT_KERNEL_FREE(object);
}
#endif