Malloc function

cancel
Showing results for 
Search instead for 
Did you mean: 

Malloc function

286 Views
lucatollot
Contributor I

Hi, I'm using IAR tool wih imxRT1020. I want use malloc function and pass a variable in the argument for dynamic allocation but the function return me a null pointer. I would like to know if is possible to pass a variable in the argument or not.

Labels (4)
Tags (3)
0 Kudos
2 Replies

171 Views
crist_xu
NXP Employee
NXP Employee

I think the size of the heap area in your project is a bit smaller, please re-configure this area, and try again

0 Kudos

217 Views
jeremyzhou
NXP TechSupport
NXP TechSupport

Hi Luca Tollot,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1) I would like to know if it's possible to pass a variable in the argument or not.
-- In the IAR demo of SDK library, it's available to calling the malloc function to request an area from the heap, please give a try.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos