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