lwip-devel
[Top][All Lists]
Advanced

[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:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

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

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

#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:

  <http://savannah.nongnu.org/task/?6863>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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