[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] memory pools question
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-users] memory pools question |
Date: |
Fri, 27 Jan 2012 18:11:15 +0100 |
jblackarty <address@hidden> wrote:
> No! In general case, sizes are NOT different. At compile-time macro
> expansions define each size, but at run-time sys_mbox_new() cannot match given
> numeric value to one of macros if their values are equal. That's the
> problem !
What's the problem there? You can just use one pool then. The number of mboxes
allocated shouldn't be limited by the sys port: instead, you should have enough
mboxes to allocate all raw, top and UDP connections. Limiting the number of
these is the expected way to limit memory usage.
> I suggest define enumeration of mbox types and change
> interface of sys_mbox_new() to pass that type instead size. This
> solution will be more flexible
Yes, that would be more flexible, but I don't see a pressing need to change the
Port API yet another time.
Simon