hi, when my target board run a period of time, the alloc_mem() return NULL in the interupt_ethernet __irq routine. what's the problems?
The documentation for the alloc_mem() function should tell you the conditions under which it will return NULL...
Thanks for your reply
I just can't find the detailed documentation for the alloc_mem(), can you give me a URL for the documentation or where can i find it?
It's actually not that hard: just think about what you require alloc_mem() to do - and then think about what reasons could possibly prevent it from doing that...
Increase heap size
Indeed - probably the most obvious thing that could cause a dynamic memory allocation to fail is that there isn't enough memory to allocate!
But you don't know what size heap he already has; maybe it should be OK - yet the allocation still fails.
So the OP still needs to think about what's happening here...