#define RT_USING_SMALL_MEM_AS_HEAP // </c> // <c1>using tiny size of memory // <i>using tiny size of memory //#define RT_USING_TINY_SIZE // </c> // </h> // <h>Console Configuration // <c1>Using console // <i>Using console #define RT_USING_CONSOLE // </c> // <o...
查看kservice.c文件,实际可以通过rtconfig.h中的宏定义来控制内存分配的实现方式,这里指定RT_USING_SMALL_MEM_AS_HEAP作为内存分配方式,将这个宏添加到rtconfig.h中宏定义。 /* Memory Management */#defineRT_USING_MEMPOOL#defineRT_USING_SMALL_MEM#defineRT_USING_HEAP#defineRT_USING_SMALL_MEM_AS_HEAP/* ...
RT_USING_SMALL_MEM_AS_HEAP RT_USING_MEMHEAP_AS_HEAP RT_USING_SLAB_AS_HEAP 应该是宏最终这样被...
CONFIG_RT_USING_MEMPOOL=y CONFIG_RT_USING_SMALL_MEM=y # CONFIG_RT_USING_SLAB is not set # CONFIG_RT_USING_MEMPOOL is not set # CONFIG_RT_USING_SMALL_MEM is not set CONFIG_RT_USING_SLAB=y # CONFIG_RT_USING_MEMHEAP is not set CONFIG_RT_USING_SMALL_MEM_AS_HEAP=y # CONFIG_RT_USI...
#define RT_USING_MEMPOOL #define RT_USING_SMALL_MEM #define RT_USING_SMALL_MEM_AS_HEAP #define RT_USING_HEAP /* end of Memory Management */ #define RT_USING_DEVICE #define RT_USING_CONSOLE #define RT_CONSOLEBUF_SIZE 128 #define RT_CONSOLE_DEVICE_NAME "uart0" #define RT_VER_NUM 0x...
#endif /RT_USING_MEMTRACE */ }; 内存管理算法的初始化和删除比较简单,主要是对rt_small_mem和第一个内存块的初始化,以及对内核对象的操作。 内存管理的表现主要体现在内存的分配与释放上,小型内存管理算法可以用以下例子体现出来。 如下图所示的内存分配情况,空闲链表指针 lfree 初始指向 32 字节的内...
_smem_setname(mem2," ");#endif/* RT_USING_MEMTRACE *///设置当前信息块的下一个为pt2/* and insert it between mem and mem->next */mem->next = ptr2;//如果不是初始时候的第一块那需要把end of heap的pre指向ptr2if(mem2->next != small_mem->mem_size_aligned + SIZEOF_STRUCT_MEM)...
#define RT_USING_HEAP /* Using Small MM--是否使用小存储容量的片子的功能,用效率来换空间的意思*...
DTS_E_TXAGG_MEMALLOCERRWORKSPACESORTORDERDESCRIPTORS DTS_E_TXAGG_SORTKEYGENFAILED DTS_E_TXAGG_STRING_TOO_LONG DTS_E_TXAGG_STRINGPROMOTIONFAILED DTS_E_TXAGG_TOOMANYCOUNTDISTINCTVALUES DTS_E_TXAGG_TOOMANYKEYS DTS_E_TXAUDIT_ONLYSTRINGLENGTHCHANGEALLOWED DTS_E_TXCHARMAP_CANTBOTHCASE DTS_E_TXCHA...
#define RT_USING_SMALL_MEM #define RT_USING_SMALL_MEM_AS_HEAP #define RT_USING_HEAP /* end of Memory Management */ /* Kernel Device Object */ #define RT_USING_DEVICE #define RT_USING_CONSOLE #define RT_CONSOLEBUF_SIZE 128 ...