Simon wrote: > After looking at the code, the cleaner solution is to define > MEM_LIBC_MALLOC to 1 and then define mem_malloc (etc.) to your > own functions (see mem.h in the upper half).
I've started looking at the TX side, and I don't understand your suggestion. My driver manages TX buffers (within a larger control struct, to be able to manage asynchronous operations). I don't think it's possible to use mem_malloc as a packet buffer allocator, as there are other types of uses, e.g. dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp)); autoip = (struct autoip *)mem_malloc(sizeof(struct autoip)); What I'd like is to be able to "redirect" pbuf_alloc to use my buffer allocator, but the pbuf struct and the payload buffer would not be contiguous, which violates the implicit assumptions of PBUF_RAM pbufs, IIUC. For the record, I've defined MEM_LIBC_MALLOC=1 MEMP_MEM_MALLOC=0 -- Regards. _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users