[Top][All Lists]

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

[lwip-devel] [bug #63322] Allow custom (non-libc) malloc implementations

From: Faidon Liambotis
Subject: [lwip-devel] [bug #63322] Allow custom (non-libc) malloc implementations to be provided
Date: Sun, 6 Nov 2022 11:57:57 -0500 (EST)


                 Summary: Allow custom (non-libc) malloc implementations to be
                 Project: lwIP - A Lightweight TCP/IP stack
               Submitter: paravoid
               Submitted: Sun 06 Nov 2022 04:57:55 PM UTC
                Category: Platform ports
                Severity: 3 - Normal
              Item Group: Feature Request
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head


Follow-up Comments:

Date: Sun 06 Nov 2022 04:57:55 PM UTC By: Faidon Liambotis <paravoid>
In 2006 (commit a91374a9) MEM_LIBC_MALLOC was introduced, to allow one to use
the libc's implementation of malloc/calloc/free.

Unfortunately this does not allow one to plug a different, non-lwip, non-libc
implementation. The code is not far from there: setting MEM_LIBC_MALLOC=1 and
#defining mem_clib_free, mem_clib_malloc and mem_clib_calloc is enough to work
around this. A spurious #include of <stdlib.h> happens in that case, though.

Instead of this workaround, we can generalize this into 
specialized case of it.

I gave it a stab with the patch attached. Let me know what you think and
please feel free to modify as necessary!

File Attachments:

Date: Sun 06 Nov 2022 04:57:55 PM UTC  Name:
0001-Add-MEM_CUSTOM_ALLOCATOR-and-make-LIBC-a-subset-of-i.patch  Size: 6KiB  
By: paravoid



Reply to this item at:


Message sent via Savannah

reply via email to

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