Isn't the trick to wait for the final tcp_sent when there is no data to
send.  At that point you should do a tcp_output and then you can free the
buffer.

Bill

>-----Original Message-----
>From: [email protected]
>[mailto:[email protected]] On
>Behalf Of Simon Goldschmidt
>Sent: Thursday, November 12, 2009 3:26 AM
>To: Mailing list for lwIP users
>Subject: Re: [lwip-users] Freeing memory after http transfer
>
>> Under special circumstances I need to transfer about 500kB of data
>from
>> lwip to a browser. To do this I borrow some memory from another task.
>> After the data is transfered I need to clear the borrowed memory and
>> return it to the other task.
>>
>> I tried using tcp_sent() to trigger this. Unfortunately the last part
>of
>> the data is cleared when I do so. This means tcp_sent is called when
>the
>> memory is still in use.
>>
>> Any idea what I can use as trigger?
>
>You did the correct thing, tcp_sent should do the trick. If not, that's
>a bug (either in lwIP, the way you are using it, or in your code or
>port) which needs to be analysed.
>
>Simon
>--
>GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
>Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
>
>
>_______________________________________________
>lwip-users mailing list
>[email protected]
>http://lists.nongnu.org/mailman/listinfo/lwip-users



_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to