lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Problems when setting MEMP_MEM_MALLOC


From: Giuseppe Modugno
Subject: [lwip-users] Problems when setting MEMP_MEM_MALLOC
Date: Wed, 14 Mar 2018 17:09:06 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

#define MEM_LIBC_MALLOC   1

If I try to set MEMP_MEM_MALLOC, I have some strange problems.

After many HTTP GET requests, the HTTP server stops answering. It seems the Ethernet MAC driver (from NXP, I'm using LPC1768) isn't able to receive Ethernet frames and ethernet_input() isn't called anymore. I couldn't understand why.

The problem happens only if the GET requests are directed to a custom "dynamic" file. In fs_open_custom() I call mem_malloc() and in fs_close_custom() I call mem_free(). If the requests are directed to a "static" file of the filesystem, the problem doesn't appear.

I understood MEMP_MEM_MALLOC enables a malloc/free implementation of memory pools. Apparently, this macro isn't related to my custom file implementation that uses mem_malloc() and mem_free() and not pools. So the problem appears complex to explain.

In fs_open_custom() I call mem_malloc(1200). I don't think 1200 is a problem here.

If MEMP_MEM_MALLOC is set to zero, this problem doesn't happen.

Could you suggest something to address to the problem?





reply via email to

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