[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #26133] Processor specific porting needs flexibility i
[lwip-devel] [bug #26133] Processor specific porting needs flexibility in terms of placement of various memory pools.
Thu, 09 Apr 2009 14:43:08 +0000
Opera/9.21 (X11; Linux i686; U; en)
Follow-up Comment #1, bug #26133 (project lwip):
Can you explain how this should be used? I presume porters of lwIP will have
to allocate an area of memory and poke it into ADI_TOOLS_memp_ptr or
something. It's not clear what advantage this brings, and would by the look
of it break the existing ports.
I think this would be better done with a function call. Use lwip/memp_std.h
to calculate the length required (as you have done), then call a
(port-defined) architecture-specific function to allocate the pool memory with
that length as an argument. This function would return a pointer to the
memory that could be assigned to memp_memory. There would also need to be the
corresponding "free this memory" call I suppose.
Ideally this should be an optional feature, so the existing behaviour is the
default (as that is what most will want) and those that need it could specify
something like #define LWIP_MEMP_EXTERNALLY_ALLOCATED 1 (just a suggestion for
the name) in lwipopts.h
Reply to this item at:
Message sent via/by Savannah