lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] Alignment problem i pbuf_alloc()


From: James Yates
Subject: RE: [lwip-users] Alignment problem i pbuf_alloc()
Date: Mon, 24 May 2004 15:47:05 +0100

Indeed it did. When I first looked at this, I assumed there was a reason
why a static buffer was used over malloc, and so to keep in line with
the existing code as much as possible, I tried to use what was already
there. I later worked out that it was probably assumed that, if malloc
was available, that would be used instead. Perhaps another LWIP type
option be added which allows use or real malloc to be defined, so as to
solve this confusion. 

Once I had made the decision to use malloc, everything else was pretty
easy. I am very impressed with LWIP which seems to work well for my
environment.

                James


-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
K.J. Mansley
Sent: 24 May 2004 14:19
To: Mailing list for lwIP users
Subject: RE: [lwip-users] Alignment problem i pbuf_alloc()

On Mon, 2004-05-24 at 09:35, James Yates wrote:

>    Since I rely on malloc and free, I simply changed the 2 defines as
> shown:
> 
> #define MEM_ALIGN(size) (size)
> #define MEM_ALIGN_SIZE(addr) (addr)
> 
>    Give it a try and see if it works for you. Hope this helps.

The design is intended to be used as you have suggested: if you find
your OS has standard support for memory allocation that you prefer to
use, switching lwip to use those should just be a matter of changing a
couple of macros.  Perhaps we should document this a bit better, as it
sounds like it took a bit of effort for you to discover this?

Thanks

Kieran



_______________________________________________
lwip-users mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/lwip-users






reply via email to

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