|
From: | address@hidden |
Subject: | Re: [lwip-devel] [bug #50040] pbuf_alloc(..., 65534, PBUF_RAM) succedes |
Date: | Thu, 12 Jan 2017 20:28:23 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 |
David van Moolenbroek wrote:
Follow-up Comment #2, bug #50040 (project lwip): [..] [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...
Simon
[Prev in Thread] | Current Thread | [Next in Thread] |