diff options
| author | [email protected] <[email protected]> | 2012-05-07 06:23:30 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2012-05-07 06:23:30 +0000 |
| commit | 1641c9db4fd628e50e57febaf59e8e0cefb58a61 (patch) | |
| tree | c5dd4851e5af61217acbd72129ea5ae47318e180 /src | |
| parent | b14044212be4d19736a518f66a51a1148d3c3002 (diff) | |
add memory heap object in module
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2113 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src')
| -rw-r--r-- | src/module.c | 7 | ||||
| -rw-r--r-- | src/rtm.c | 10 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/module.c b/src/module.c index 19771137a5..71929b4462 100644 --- a/src/module.c +++ b/src/module.c @@ -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; #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 /* initialize object container - memory pool */ rt_list_init(&(module->module_object[RT_Object_Class_MemPool].object_list)); @@ -110,6 +110,16 @@ RTM_EXPORT(rt_mq_recv); RTM_EXPORT(rt_mq_control); #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 /* * memory pool interface symbol |
