[Top][All Lists]

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

Re: [lwip-devel] [bug #50040] pbuf_alloc(..., 65534, PBUF_RAM) succedes

From: D.C. van Moolenbroek
Subject: Re: [lwip-devel] [bug #50040] pbuf_alloc(..., 65534, PBUF_RAM) succedes
Date: Thu, 12 Jan 2017 21:34:02 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 1/12/2017 20:28, address@hidden wrote:
David van Moolenbroek wrote:
[Off-topic: that udp case does worry me: even if allocation doesn't get
truncated, it will hit the assertion I mentioned, but lwIP doesn't seem to have a clear model for "use PBUF_POOL for allocation if we are using pools, or PBUF_RAM otherwise" so I am not sure what should be done there. There are
probably other cases like that, and this does worry me quite a bit..]

Up to now, PBUF_POOL is actually meant for RX from a netif. All other cases use PBUF_RAM for allocation.

This is to be improved (see the unfortunately rather old buf #3031).
The idea is to convert 'pbuf_type' to a bit field e.g. indicating tx/rx, contiguous buffer requested, etc. and then letting the code behind (or even the application) decide which memory type or which pool is used...

Well, that sounds great, but it also sounds like a massive change where it's going to be very hard to keep into account everyone's situation etc - which may explain why it hasn't happened yet.. I really can't promise being able to work on anything myself, but it seems that it would be possible to make at least some progress in the right direction, for example by adding exactly such a "POOL chain or RAM depending on your configuration" allocation option and preparing a bit more code for the possibility of getting back a chain of pbufs rather than a single one. Do such more incremental changes still sound like a welcome step forward?


reply via email to

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