Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

malloc failure

Altera_Forum
Honored Contributor II
1,161 Views

Hi, 

I am using eCos for NiosII. I made my APP and when I am dbugging throuh the App, I found out that malloc call is failing. Initially I thought may be my Application is trying to allocate a big amount of memory. So I tried with a small memory, That also it failed.. After that I just tried a small program:- 

int main(void) 

char *addr1; 

addr1 = malloc(200); 

if( NULL == addr1 ) 

return 1; 

printf("Hello, eCos world!!\n"); 

 

return 0; 

Even this one also failed in that malloc. So can anyone please guide me through this? What might be the reason for failing malloc? 

 

Akhil
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
352 Views

 

--- Quote Start ---  

 

 

--- Quote Start ---  

 

Sorry for the late update. Was busy with the release activities.. It was the problem with the Nios Board. When we changed the board with another cyclone series board, The same program was working fine. Altera Enggr replaced the board that day itself.. 

 

Thanx 

Akhil  

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=21861)</div> 

 

--- Quote End ---  

0 Kudos
Reply