_lwmem_alloc vs _mem_alloc

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

_lwmem_alloc vs _mem_alloc

1,083 次查看
netra
Contributor IV

what is the situation for using _mem_alloc and _lwmem_alloc???

0 项奖励
回复
1 回复

834 次查看
JuroV
NXP Employee
NXP Employee

Hello, I do not know what you need to know exactly. :smileyhappy:

For usual application developers, both return address of allocated memory space in the heap. The difference is in how they work internally.

lwmem or mem stands for memory manager used: you can use either mem or lwmem. They are compiled-in during PSP build process. In the user_config.h you can choose which memory manager you want to use. Then you get also exported header with macros redefining your _mem_alloc to _mem_alloc (the same call name if the memory manager is mem) or _mem_alloc to _lwmem_alloc (the translation to lwmem manager call in the case the memory manager is lwmem). That's why we recommend to use _mem_alloc in your application and to choose memory manager in user_config.h

0 项奖励
回复