From 2f409c85f1faf3662c9ee99eed78e460286ec046 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Tue, 12 Dec 2017 07:36:37 +0800 Subject: [Kernel] Use rt_object_get_information to get object chain --- src/memheap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/memheap.c') diff --git a/src/memheap.c b/src/memheap.c index 8b7588a068..dcd9114620 100644 --- a/src/memheap.c +++ b/src/memheap.c @@ -620,10 +620,10 @@ void *rt_malloc(rt_size_t size) struct rt_list_node *node; struct rt_memheap *heap; struct rt_object_information *information; - extern struct rt_object_information rt_object_container[]; /* try to allocate on other memory heap */ - information = &rt_object_container[RT_Object_Class_MemHeap]; + information = rt_object_get_information(RT_Object_Class_MemHeap); + RT_ASSERT(information != RT_NULL); for (node = information->object_list.next; node != &(information->object_list); node = node->next) -- cgit v1.3.1