当前位置:网站首页>Introduction to RT thread kernel (5) -- memory management
Introduction to RT thread kernel (5) -- memory management
2022-07-05 04:20:00 【Number and form】
Basic concepts
There are two kinds of storage space in computer system , One is internal storage space RAM( Ram ) Fast access , External storage space ROM( read-only memory ) Stable stored data .
Two memory management algorithms
Static memory allocation algorithm : Allocate memory blocks of the preset size during user initialization in the static memory pool , Ensure the reliability of the equipment, but consider the upper limit of memory , Memory efficiency is low , Efficient distribution and use
Dynamic memory allocation algorithm : Allocate memory blocks of the size specified by the user in the dynamic memory pool , High memory efficiency , Memory pools are prone to fragmentation
Dynamic memory management algorithm Small memory management algorithm and SLAB Memory management algorithm
Interface function of static memory management :
Initialize memory pool :rt_mp_init
Out of memory pool :rt_thread_detach
Create a memory pool :rt_thread_create
Delete memory pool :rt_thread_delete
Static memory application function :rt_mp_alloc
j Static memory release function :rt_mp_free
Common interface functions for dynamic memory management :
Memory heap system initialization :rt_system_heap_init
Allocate memory blocks :rt_malloc
Free memory block :rt_free
Reallocate memory blocks :rt_realloc
Allocate multiple memory blocks :rt_calloc
边栏推荐
- Burpsuite grabs app packets
- 在线SQL转Excel(xls/xlsx)工具
- [thingsboard] how to replace the homepage logo
- C language course setting: cinema ticket selling management system
- SPI read / write flash principle + complete code
- Learning notes 8
- 【科普】热设计基础知识:5G光器件之散热分析
- 长度为n的入栈顺序的可能出栈顺序种数
- A solution to the problem that variables cannot change dynamically when debugging in keil5
- BDF application - topology sequence
猜你喜欢
随机推荐
Online text line fixed length fill tool
Alibaba cloud ECS uses cloudfs4oss to mount OSS
MacBook installation postgresql+postgis
Containerd series - what is containerd?
Technical tutorial: how to use easydss to push live streaming to qiniu cloud?
How to remove installed elpa package
[phantom engine UE] the difference between running and starting, and the analysis of common problems
【虚幻引擎UE】实现背景模糊下近景旋转操作物体的方法及踩坑记录
长度为n的入栈顺序的可能出栈顺序种数
level17
Judge whether the stack order is reasonable according to the stack order
How to realize real-time audio and video chat function
蛇形矩阵
“金九银十”是找工作的最佳时期吗?那倒未必
BDF application - topology sequence
Online sql to excel (xls/xlsx) tool
kubernetes集群之调度系统
Rome chain analysis
DFS and BFS concepts of trees and graphs
level18