summaryrefslogtreecommitdiff
path: root/src/slab.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-06-10 18:46:11 +0800
committerBernard Xiong <[email protected]>2018-06-10 18:46:11 +0800
commitdf64a297abaf382d21aedbf7bf8b8e52e1c774a5 (patch)
tree323d24995a5e3e2ad2671ba070e586ecea182273 /src/slab.c
parent564df04da1e0d0e7e3ac374fc7c3a51f2b0dba21 (diff)
[Kernel] Remove memory ops when SLAB and module enable
Diffstat (limited to 'src/slab.c')
-rw-r--r--src/slab.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/slab.c b/src/slab.c
index 5e6a204896..16c68a2408 100644
--- a/src/slab.c
+++ b/src/slab.c
@@ -496,11 +496,6 @@ void *rt_malloc(rt_size_t size)
if (size == 0)
return RT_NULL;
-#ifdef RT_USING_MODULE
- if (rt_module_self() != RT_NULL)
- return rt_module_malloc(size);
-#endif
-
/*
* Handle large allocations directly. There should not be very many of
* these so performance is not a big issue.
@@ -705,11 +700,6 @@ void *rt_realloc(void *ptr, rt_size_t size)
return RT_NULL;
}
-#ifdef RT_USING_MODULE
- if (rt_module_self() != RT_NULL)
- return rt_module_realloc(ptr, size);
-#endif
-
/*
* Get the original allocation's zone. If the new request winds up
* using the same chunk size we do not have to do anything.
@@ -800,15 +790,6 @@ void rt_free(void *ptr)
RT_OBJECT_HOOK_CALL(rt_free_hook, (ptr));
-#ifdef RT_USING_MODULE
- if (rt_module_self() != RT_NULL)
- {
- rt_module_free(rt_module_self(), ptr);
-
- return;
- }
-#endif
-
/* get memory usage */
#if RT_DEBUG_SLAB
{