_lwmem_alloc vs _mem_alloc

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

_lwmem_alloc vs _mem_alloc

531件の閲覧回数
netra
Contributor IV

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

0 件の賞賛
1 返信

282件の閲覧回数
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 件の賞賛