提交 1641c9db 编写于 作者: D dzzxzz@gmail.com

add memory heap object in module

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2113 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 b1404421
...@@ -224,9 +224,11 @@ typedef struct rt_object *rt_object_t; /* Type for kernel objec ...@@ -224,9 +224,11 @@ typedef struct rt_object *rt_object_t; /* Type for kernel objec
* - Event * - Event
* - MailBox * - MailBox
* - MessageQueue * - MessageQueue
* - MemHeap
* - MemPool * - MemPool
* - Device * - Device
* - Timer * - Timer
* - Module
* - Unknown * - Unknown
* - Static * - Static
*/ */
......
...@@ -293,6 +293,13 @@ static void rt_module_init_object_container(struct rt_module *module) ...@@ -293,6 +293,13 @@ static void rt_module_init_object_container(struct rt_module *module)
module->module_object[RT_Object_Class_MessageQueue].type = RT_Object_Class_MessageQueue; module->module_object[RT_Object_Class_MessageQueue].type = RT_Object_Class_MessageQueue;
#endif #endif
#ifdef RT_USING_MEMHEAP
/* initialize object container - memory heap */
rt_list_init(&(module->module_object[RT_Object_Class_MemHeap].object_list));
module->module_object[RT_Object_Class_MemHeap].object_size = sizeof(struct rt_memheap);
module->module_object[RT_Object_Class_MemHeap].type = RT_Object_Class_MemHeap;
#endif
#ifdef RT_USING_MEMPOOL #ifdef RT_USING_MEMPOOL
/* initialize object container - memory pool */ /* initialize object container - memory pool */
rt_list_init(&(module->module_object[RT_Object_Class_MemPool].object_list)); rt_list_init(&(module->module_object[RT_Object_Class_MemPool].object_list));
......
...@@ -110,6 +110,16 @@ RTM_EXPORT(rt_mq_recv); ...@@ -110,6 +110,16 @@ RTM_EXPORT(rt_mq_recv);
RTM_EXPORT(rt_mq_control); RTM_EXPORT(rt_mq_control);
#endif #endif
#ifdef RT_USING_MEMHEAP
/*
* memory heap interface symbol
*/
RTM_EXPORT(rt_memheap_init);
RTM_EXPORT(rt_memheap_detach);
RTM_EXPORT(rt_memheap_alloc);
RTM_EXPORT(rt_memheap_free);
#endif
#ifdef RT_USING_MEMPOOL #ifdef RT_USING_MEMPOOL
/* /*
* memory pool interface symbol * memory pool interface symbol
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册