[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-devel] [task #10474] Different questions
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-devel] [task #10474] Different questions |
Date: |
Mon, 28 Jun 2010 07:57:28 +0200 |
Replying to the list:
EisenkolbThomas wrote:
> 1.) It would be very useful for TCP connections to resuse the receive
> buffer for the next packet to send. [..]
> Maybe you can create any option to give a pbuf,
> netbuf or something else to netconn_write?
Those are 2 different things: creating a netconn_send function to take a pbuf
is a good idea, but reusing an RX pbuf can be invalid in some cases. However,
once that netconn_send function is available, you might just reuse the pbuf in
your setup...
> 2.) I have the problem of a hard fault but I am sure it is my problem. I
> am
> using a custom memory pool and I call mem_malloc from different threads!
> IS it
> allowed to do so or is it possible to give a Lock Functionality for
> allocation
> and freeing of memory?
SYS_LIGHTWEIGHT_PROT==1 and NO_SYS==0 should protect both the pools
(memp_malloc) as well as the heap (mem_malloc) to allocate from different
threads. OTOH, to call mem_free (heap) at interrupt level, you have to use a
recent version and set LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT==1.
Simon
--
GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.
Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl