Memory allocation using malloc/calloc problem in USB Stack

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

Memory allocation using malloc/calloc problem in USB Stack

2,164件の閲覧回数
vikashkumar
Contributor I

Hi,

I'm working on USB host integration. In usb_khci_preinit() function i'm trying to allocate memory at run time using malloc.

I tried with  OS_Mem_alloc_zero(sizeof(usb_khci_host_state_struct_t)); function as well as int *p=malloc(10);.

In both cases i got return value is 0. It means i unable to allocate memory.

I need some help to solve this problem.

ラベル(1)
0 件の賞賛
返信
1 返信

1,718件の閲覧回数
bobpaddock
Senior Contributor IV

Check that the linker script allocates any heap memory.

Also see this discussion:

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

0 件の賞賛
返信