diff options
| author | Tangyuxin <[email protected]> | 2021-12-16 16:23:58 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-12-16 16:23:58 +0800 |
| commit | d724eed9fc09269c3c6e921c1f8b2df573508419 (patch) | |
| tree | 92f8528e0efbe28d4632692896d0bcaa2e45b3b6 /src/object.c | |
| parent | 874f6c84f19f8ca24ebd00a9a95e7af02afc49a0 (diff) | |
分离内存分配接口与内存分配算法 (#5175)
* [kernel][mem] Multiple instances of small memory allocation algorithm
* [kernel][mem] Change small memory management algorithm memory header flag
* [kernel][mem] Fix assertion problem
* [kernel][slab] Multiple instances of slab memory management algorithm
* [kernel][memheap] Remove rt_malloc/rt_free/rt_realloc and other related memory interfaces
* [kernel][mem] Clean up memory space of small memory management objects
* [kernel][kservice] Add memory application interface and thread protection interface
* [kernel][kservice] Fix function return value problem
* [kernel][memheap] Optimize memheaptrace print
* [kernel][memheap] Support best mode
* [kernel][memory] Remove semaphore lock
* [kernel][memheap] Add locked flag
* [kernel][memory] Support malloc memory in interrupt
* [kernel][memheap] Add 'memheapcheck' cmd
* [kernel][mem] Fix failure to request full memory
* [kernel][memheap] Fix compilation warning
* [kernel][mem] Fix mem realloc ASSERT
* [examples][testcases] Add small mem testcase
* [examples][mem_tc] Modify test memory size
* [examples][testcases] Add slab memory management algorithm test case
* [examples][testcases] fix small memory management algorithm test case
* [kernel][memory] Adjusting memory allocation algorithm object definition and interface
* [kernel][memory] Fix compilation warning
* [examples][utest] Fix mem test case
* [examples][utest] fix slab test case
* [utest][testcases] Shorten test time
* [kernel][memory] Formatting code
* [examples][utest] Adjust test run time
* [examples][utest] Formatting code
* [bsp] update all rtconfig.h
Diffstat (limited to 'src/object.c')
| -rw-r--r-- | src/object.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/object.c b/src/object.c index 66d5775bd7..76534f4566 100644 --- a/src/object.c +++ b/src/object.c @@ -56,6 +56,9 @@ enum rt_object_info_type #ifdef RT_USING_MODULE RT_Object_Info_Module, /**< The object is a module. */ #endif +#ifdef RT_USING_HEAP + RT_Object_Info_Memory, /**< The object is a memory. */ +#endif RT_Object_Info_Unknown, /**< The object is unknown. */ }; @@ -104,6 +107,10 @@ static struct rt_object_information _object_container[RT_Object_Info_Unknown] = /* initialize object container - module */ {RT_Object_Class_Module, _OBJ_CONTAINER_LIST_INIT(RT_Object_Info_Module), sizeof(struct rt_dlmodule)}, #endif +#ifdef RT_USING_HEAP + /* initialize object container - small memory */ + {RT_Object_Class_Memory, _OBJ_CONTAINER_LIST_INIT(RT_Object_Info_Memory), sizeof(struct rt_memory)}, +#endif }; #ifdef RT_USING_HOOK |
