Thank you for the clarifications.

With regards,
Seif

On Mon, Oct 19, 2009 at 11:31 AM, Simon Goldschmidt <goldsi...@gmx.de>wrote:

>
> > I need confirmation about the lwIP memory use.
> >
> > The lwIP uses two areas of memory:
> > - one dedicated to the buffers pbuf and defined by :
> > PBUF_POOL_SIZE x PBUF_POOL_BUFSIZE
> > - and one area for the structures (tcp_pcb, udp_pcb) and other
> > variables which are dynamically allocated, and this area is defined
> > by: the MEM_SIZE
>
> That's not all (and partly not correct):
> - There are 3 types of pbufs: REF/ROM, RAM and POOL. PBUF_POOL_SIZE *
> PBUF_POOL_BUFSIZE only refers to type POOL.
> - RAM pbufs are allocated in the memory defined by MEM_SIZE (this memory is
> not used much aside from RAM pbufs) - this is the *heap* and it is allocated
> as mem_memory.
> - REF/ROM pbufs as well as pcbs and some other stuff is allocated from
> dedicated pools per structure type. The amount of structures is defined by
> the various MEMP_NUM_ defines. Together, this memory is allocated as
> memp_memory and it *includes* the pbuf POOL.
>
> However, if you define MEMP_MEM_MALLOC to 1 in your lwipopts.h, *every*
> piece of dynamically allocated memory will come from the heap (the size of
> which is defined by MEM_SIZE).
>
> 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
> lwip-users@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to