[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #5913] memp.c: don't waste memory

From: Simon Goldschmidt
Subject: [lwip-devel] [patch #5913] memp.c: don't waste memory
Date: Thu, 03 May 2007 18:17:28 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/20070309 Firefox/


                 Summary: memp.c: don't waste memory
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: goldsimon
            Submitted on: Donnerstag 03.05.2007 um 18:17
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: goldsimon
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any



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...

See attached patch


File Attachments:

Date: Donnerstag 03.05.2007 um 18:17  Name: memp.c.patch  Size: 897B   By:



Reply to this item at:


  Nachricht geschickt von/durch Savannah

reply via email to

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