[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] PBUF_RAM etc
From: |
Stephane Lesage |
Subject: |
Re: [lwip-users] PBUF_RAM etc |
Date: |
Thu, 16 Feb 2012 17:40:58 +0100 |
> Can you explain why the pbuf struct and the payload buffer need to be
> contiguous? What problems are solved by having the struct and the
> buffer stored contiguously?
This is used for PBUF_POOL and PBUF_RAM.
This allows to NOT waste memory and time in separate payload buffer
allocation.
> There is a pointer to a buffer in the struct, it is redundant if the
> payload is at a known offset, right?
For POOL/RAM yes, but this is necessary for PBUF_ROM and PBUF_REF which
have external payload buffer.
--
Stephane Lesage