lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] lwIP with FreeRTOS memory problem


From: Simon Goldschmidt
Subject: Re: [lwip-users] lwIP with FreeRTOS memory problem
Date: Tue, 29 Nov 2016 09:29:34 +0100

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]