malloc

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

malloc

1,075 次查看
chriswestervelt
Contributor III

I'm developing a hard metal app on the K82 with KDS 3.2.  I am using a link list with malloc and free but the mallocs are failing.  The heap is set in the .ld file to 0x8000.  Why is the malloc failing?

标签 (1)
0 项奖励
4 回复数

676 次查看
davenadler
Senior Contributor I

I've also got a problem with malloc and fear the runtime is not properly set up.
Behavior here will be highly dependent on which libraries you've selected.
In any case, two things you should check:

  1. Look at the address returned by first malloc.
    Is it in the area you expect (ie, heap in m_data2), or somewhere in m_data?
  2. Beware that over-rides (as used for sizes) of the LD file do not work due to KDS bugs;
    linker command line is improperly constructed.
    I'll try post something about that here for NXP to ignore.
    Check that you really got the space you expected by carefully checking the map.

Hope this helps!
Best Regards, Dave

0 项奖励

676 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello All,

Sorry for the inconvenient to you , i have reported it to KDS team,

and i will reply to you .ASAP.

BR

Alice

0 项奖励

676 次查看
davenadler
Senior Contributor I

Alice_Yang wrote:

Hello All,

 

Sorry for the inconvenient to you , i have reported it to KDS team,

and i will reply to you .ASAP.

 

BR

Alice

Alice, did you mean to reply to this thread: https://community.nxp.com/message/863981 ???

0 项奖励

676 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Dave,

I find the two problem is the same , so i will reply you at this thread :

https://community.nxp.com/thread/441643 

And now I haven't get the answer.

Sorry for the inconvenient to you .

BR

Alice

0 项奖励