lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #5687] api_lib.c: allocate all 'struct api_msg' on s


From: goldsimon
Subject: [lwip-devel] [patch #5687] api_lib.c: allocate all 'struct api_msg' on stack instead of mem-pool
Date: Mon, 15 Jan 2007 10:01:41 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1

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

                 Summary: api_lib.c: allocate all 'struct api_msg' on stack
instead of mem-pool
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: goldsimon
            Submitted on: Montag 15.01.2007 um 10:01
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

The messages passed between application thread and tcpip thread can be
allocated on the stack instead of through memp_malloc(), which should
minimize memory usage (struct api_msg is about 24 bytes, only one at a time
is allocated per thread) and should be (a little bit) faster (since
allocating on the stack is faster that memp_malloc()).

NOTE that in tcpip.c:179 the api_msg was deleted if allocation of
MEMP_TCPIP_MSG failed! This would leave the calling thread deadlocked since
it waits for an answer of the tcpip thread. Thus, the old version didn't work
anyway if the allocation failed...



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Montag 15.01.2007 um 10:01  Name: patch_MEMP_API_MSG.patch  Size: 8kB  
By: goldsimon

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

    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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