[Top][All Lists]

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

[lwip-devel] [task #6863] Create option to use different size pools (usi

From: Simon Goldschmidt
Subject: [lwip-devel] [task #6863] Create option to use different size pools (using memp) instead of heap
Date: Wed, 13 Jun 2007 10:50:30 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/20070515 Firefox/

Follow-up Comment #6, task #6863 (project lwip):

I'm currently using a heap-to-pools implementation with the following

#define MEM_POOL_COUNT      7
#define MEM_POOL_ELEMSIZES  {32, 64, 128, 256, 512, 1024, 1548}
#define MEM_POOL_ELEMCOUNTS {500, 100, 100, 100, 100, 100 , 100}

But in contrast to memp.c, I create the pool memory at runtime. I have 2
static arrays:

static const u32_t memSizes[MEM_POOL_COUNT] = MEM_POOL_ELEMSIZES;
static const u32_t memCounts[MEM_POOL_COUNT] = MEM_POOL_ELEMCOUNTS;

which I can loop over to create the pools using malloc(). In memp.c, however,
I would have to give the pool sizes in a preprocessor-compatible way to create
the static memp_memory.

And I didn't find a way to do that, yet. The only way is what Frédéric
suggested: simply don't configure the pool count...
But I'd rather not have that limitation!


Reply to this item at:


  Nachricht geschickt von/durch Savannah

reply via email to

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