[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [task #7136] Centralize mempool settings in separate file
From: |
Jared Grubb |
Subject: |
[lwip-devel] [task #7136] Centralize mempool settings in separate file |
Date: |
Wed, 01 Aug 2007 00:26:34 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 |
URL:
<http://savannah.nongnu.org/task/?7136>
Summary: Centralize mempool settings in separate file
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: jgrubb
Submitted on: Tuesday 07/31/2007 at 17:26
Category: None
Should Start On: Tuesday 07/31/2007 at 00:00
Should be Finished on: Tuesday 07/31/2007 at 00:00
Priority: 5 - Normal
Status: None
Privacy: Public
Percent Complete: 0%
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
Effort: 0.00
_______________________________________________________
Details:
I would like to propose using the C preprocessor to generate the mempool
pieces:
EXPLANATION: There will be a new file called memp.def (or something else if
you like). It will contain a list of all the pools that will be managed by
memp.c. The memp.c, memp.h, and stats.c files will use this file to construct
what they need.
ADVANTAGE: Adding new mempools is very easy -- one line of code and all three
files get updated automatically. As an added feature, the developer can
customize this file and add in his own extra pools (for example mbox pools for
sys_mbox_new, or even other pools for his applications)
NOTE: This uses the x-macro pattern in C. See
http://en.wikipedia.org/wiki/C_preprocessor#X-Macros for an explanation of why
this works.
I have tested this on my system, and the memp_sizes[], memp_num[] memp_t, and
memp_memory do not change as a result of this change.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tuesday 07/31/2007 at 17:26 Name: memp.def Size: 2kB By: jgrubb
<http://savannah.nongnu.org/task/download.php?file_id=13536>
-------------------------------------------------------
Date: Tuesday 07/31/2007 at 17:26 Name: memp.h.patch Size: 903B By:
jgrubb
<http://savannah.nongnu.org/task/download.php?file_id=13537>
-------------------------------------------------------
Date: Tuesday 07/31/2007 at 17:26 Name: memp.c.patch Size: 3kB By: jgrubb
<http://savannah.nongnu.org/task/download.php?file_id=13538>
-------------------------------------------------------
Date: Tuesday 07/31/2007 at 17:26 Name: stats.c.patch Size: 854B By:
jgrubb
<http://savannah.nongnu.org/task/download.php?file_id=13539>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/task/?7136>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [task #7136] Centralize mempool settings in separate file,
Jared Grubb <=