Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

malloc failure

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

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- 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 ---