摘要
LwIP的本质就是对数据包的处理,在LwIP中利用不同类型的pbuf来对数据的处理进行一系列的管理。在此基础上,主要是对pbuf的基本内存结构、内存类型、内存申请、内存释放以及相对应的部分重要源代码进行了研究与探索,分析了如何通过源代码中的相关参数来改变内存池的个数以及尺寸大小,并在以Cortex-M3为内核的开发板上进行模拟PBUF_RAM类型内存的申请和释放。这对更好地理解内存分配问题有很大的帮助,对以后更加灵活地运用pbuf结构来管理数据包奠定了基础。
The essence of LwIP is the handling of the data packets,the different types of pbuf are used to deal with a series of data management in the LwIP.On this basis,the main memory structure of pbuf,memory type,memory application,memory release and the corresponding part of the important source code are studied.Then analyzes how to change the number of memory pool and the size of memory pool through the related parameters in source code.And the application and release of PBUF_RAM type memory are simulated on the Cortex-M3 kernel development board.There is a great help to understand the memory allocation problem.It lays a foundation for the more flexible use of pbuf structure to manage data packets.
出处
《单片机与嵌入式系统应用》
2018年第2期14-17,共4页
Microcontrollers & Embedded Systems