pekez wrote:
> [..]
> However, when I set MEMP_MEM_MALLOC to 1 [..]
> it crashes when XEmacPs_IntrHandler (I am using Xilinx layer 2 drivers) tries 
> to allocate memory for pbuf.

I'm afraid using MEMP_MEM_MALLOC from interrupt does currently not work: it 
will allocate any memory
from the heap, which is protected via getting a semaphore.

Depending on your port, this might work for a while and only crash if the heap 
is actually protected (used)
from non-interrupt context and the interrupt handler tries to access it (as 2nd 
context). This *might*
explain why it works for a while.

Being like that, you can still use MEMP_MEM_MALLOC when changing your ISR to a 
task-based DSR (like
Richard explained), if that's a solution for you...


Simon

_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to