lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #6594] memp.c with standard C-library


From: Gottfried Spitaler
Subject: [lwip-devel] [patch #6594] memp.c with standard C-library
Date: Thu, 31 Jul 2008 07:27:48 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1

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

                 Summary: memp.c with standard C-library
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: gottfried
            Submitted on: Donnerstag 31.07.2008 um 07:27
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:


file: "lwip/opt.h"  add folowing #define

/**
 * MEMP_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library
 * instead of the lwip internal allocator. Can save code size if you
 * already use it.
 */
#ifndef MEMP_LIBC_MALLOC
#define MEMP_LIBC_MALLOC                 0
#endif



file: "lwip/memp.c"

only const u16_t memp_sizes[MEMP_MAX] is used

memp_malloc(type) uses mem_malloc(memp_sizes[type]) instead of memp_memory
memp_free(type, mem) uses mem_free(mem) instead of memp_memory


I think it generates lesser code when using malloc/free with C-Library if the
compiler have them





    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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