lwip-devel
[Top][All Lists]
Advanced

[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:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

URL:
  <http://savannah.nongnu.org/patch/?5913>

                 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

    _______________________________________________________

Details:

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:
goldsimon

<http://savannah.nongnu.org/patch/download.php?file_id=12682>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5913>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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