lwIP - A Lightweight TCP/IP stack - Tasks: task #6863, Create option to use different...
You are not allowed to post comments on this tracker with your current authentication level.
task #6863: Create option to use different size pools (using memp) instead of heap
Submitter: | Simon Goldschmidt <goldsimon> | ||
Submitted: | Thu 10 May 2007 11:11:54 AM UTC | ||
Category: | None | Should Start On: | Thu 10 May 2007 12:00:00 AM UTC |
Should be Finished on: | Thu 10 May 2007 12:00:00 AM UTC | Priority: | 3 - Low |
Status: | Done | Privacy: | Public |
Assigned to: | goldsimon | Percent Complete: | 90% |
Open/Closed: | Closed | Planned Release: | None |
Effort: | 0.00 |
Jump to the original submission
Thu 21 Jun 2007 08:18:42 PM UTC, comment #11: |
Simon Goldschmidt <goldsimon> |
Thu 21 Jun 2007 08:13:07 PM UTC, comment #10: As a start, I've checked in a version that has a fixed number of 4 different pools. If you want less, simply set element size and -count of an upper pool to 0.
|
Simon Goldschmidt <goldsimon> |
Wed 13 Jun 2007 07:23:18 PM UTC, comment #9: In a first time, this is not a bad idea. I would like to have time to do a statistic analyze of number and size of mem_malloc to tune these values. Don't you have any idea of what is need (else, it could be difficult to tune these lwIP options) ?
|
Frédéric Bernon <fbernon> |
Wed 13 Jun 2007 07:15:29 PM UTC, comment #8: The only idea that I have regarding the preprocessor magic is
|
Simon Goldschmidt <goldsimon> |
Wed 13 Jun 2007 12:54:16 PM UTC, comment #7: You could remove MEM_POOL_COUNT, and check in mem_init that sizeof(memSizes)==sizeof(memCounts).
|
Frédéric Bernon <fbernon> |
Wed 13 Jun 2007 10:50:29 AM UTC, comment #6: I'm currently using a heap-to-pools implementation with the following defines:
|
Simon Goldschmidt <goldsimon> |
Tue 12 Jun 2007 03:34:56 PM UTC, comment #5: The problems you describe in comment #1 are indeed ugly! I'd rather see something more elegant if possible, although don't have any preprocessor magic off the top of my head. Would doing something like this work better:
|
Kieran Mansley <kieranm> |
Tue 12 Jun 2007 06:59:14 AM UTC, comment #4: Not yet a solution to use the preprocessor, but some remarks:
|
Frédéric Bernon <fbernon> |
Mon 11 Jun 2007 05:40:31 PM UTC, comment #3:
|
Simon Goldschmidt <goldsimon> |
Mon 11 Jun 2007 05:29:11 PM UTC, comment #2: With another stack I use, there is three pools with different size, and its pretty static (no possibility to add or remove other poll, they are named small, medium and large).
|
Frédéric Bernon <fbernon> |
Mon 11 Jun 2007 04:21:44 PM UTC, comment #1: I've finally managed to create a mem.c implementation that uses memp pools. The challenge I faced (am still facing in fact) is the following:
|
Simon Goldschmidt <goldsimon> |
Thu 10 May 2007 11:11:54 AM UTC, original submission:
As I currently am using it that way and I think preventing fragmentation is a good thing, I want to introduce a configurable amount of memp-pools dedicated to be used by a different mem_malloc() implementation that uses the next biggest pool to satisfy an allocation requirement.
|
Simon Goldschmidt <goldsimon> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 8 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2007-06-21 | goldsimon | Status | In Progress | Done | |
Percent Complete | 10% | 90% | |||
Open/Closed | Open | Closed | |||
2007-06-11 | goldsimon | Priority | 1 - Later | 3 - Low | |
Status | None | In Progress | |||
Percent Complete | 0% | 10% | |||
Assigned to | None | goldsimon | |||
2007-06-11 | goldsimon | Attached File | - | Added mem_pools.patch, #13016 |
Powered by Savane 3.13-cf05.
Corresponding source code
I considere this as done, since the only remaining thing would be to get a configurable amount of pools that is compatible with our way of calculating the size of memp_memory (in memp.c).