lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Putting memp_memory (in core/memp.c) in its own section


From: Simon Goldschmidt
Subject: Re: [lwip-devel] Putting memp_memory (in core/memp.c) in its own section
Date: Mon, 24 Oct 2011 09:22:48 +0200

David Brown <address@hidden> wrote:
> These macros alone would not be sufficient, since some compilers require 
> a couple of #pragma's here, and that always works badly with #define'd 
> macros.
> [..]
> You would need something like:
> 
> #ifdef LWIP_MEM_USE_INCLUDES
> #  include "arch/lwipmembefore.h"
> #endif
> LWIP_MEM_BEFORE
> static u8_t memp_memory[MEM_ALIGNMENT - 1
> #define LWIP_MEMPOOL(name,num,size,desc) + ( (num) * (MEMP_SIZE + 
> MEMP_ALIGN_SIZE(size) ) )
> #include "lwip/memp_std.h"
> ]
> LWIP_MEM_AFTER
> ;
> #ifdef LWIP_MEM_USE_INCLUDES
> #  include "arch/lwipmemafter.h"
> #endif

For one big memp_memory, that would be enough, but to be able to move *all* 
lwIP-defined data to different sections, we would need to encode which variable 
is defined in to the various defines and includes. That would make it very 
unreadable though. I'd only implement this if people really, really need it.

Simon
-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!               
Jetzt informieren: http://www.gmx.net/de/go/freephone



reply via email to

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