lwIP - A Lightweight TCP/IP stack - Patches: patch #5913, memp.c: don't waste memory
You are not allowed to post comments on this tracker with your current authentication level.
patch #5913: memp.c: don't waste memory
Submitter: | Simon Goldschmidt <goldsimon> | ||
Submitted: | Thu 03 May 2007 06:17:27 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Done | Privacy: | Public |
Assigned to: | goldsimon | Open/Closed: | Closed |
Planned Release: | None |
Fri 04 May 2007 03:52:43 PM UTC, comment #2: |
Simon Goldschmidt <goldsimon> |
Thu 03 May 2007 07:18:00 PM UTC, comment #1: I agree with your analysis, well spotted!
|
Jonathan Larmour <jifl> |
Thu 03 May 2007 06:17:27 PM UTC, original submission:
On allocation using mem_malloc(), the returned pointer (mem) is put MEMP_SIZE after the original struct memp. However, since the 'next' pointer of struct memp is not used while not in the pool, we can return the struct memp as mem, resulting in not wasting the 4 bytes (for me, could be more or less :) used for struct memp. Not much, but bit by bit...
|
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 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2007-05-04 | goldsimon | Status | None | Done | |
Open/Closed | Open | Closed | |||
2007-05-03 | goldsimon | Attached File | - | Added memp.c.patch, #12682 |
Powered by Savane 3.13-02a9.
Corresponding source code
Checked this in (also eliminating local variable "ram").
Closing as Done.