summaryrefslogtreecommitdiff
path: root/src/memheap.c
diff options
context:
space:
mode:
authoraozima <[email protected]>2021-07-14 22:08:30 +0800
committeraozima <[email protected]>2021-09-18 10:12:33 +0800
commit2e5b4736fe86e852c218d9ed0e492ba9ea6a3d56 (patch)
tree3c21a16c4e49ee57fea16d5c29b787903feed93d /src/memheap.c
parent00221bd43f8aad4a91e44fe1a7c6fe85571df456 (diff)
[kernel] update memheap auto binding policy.
Diffstat (limited to 'src/memheap.c')
-rw-r--r--src/memheap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/memheap.c b/src/memheap.c
index 8422b1d802..d1c2822922 100644
--- a/src/memheap.c
+++ b/src/memheap.c
@@ -852,6 +852,7 @@ void *rt_malloc(rt_size_t size)
/* try to allocate in system heap */
ptr = rt_memheap_alloc(&_heap, size);
+#ifdef RT_USING_MEMHEAP_AUTO_BINDING
if (ptr == RT_NULL)
{
struct rt_object *object;
@@ -881,6 +882,7 @@ void *rt_malloc(rt_size_t size)
break;
}
}
+#endif /* RT_USING_MEMHEAP_AUTO_BINDING */
#ifdef RT_USING_MEMTRACE
if (ptr == RT_NULL)