lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Problems when setting MEMP_MEM_MALLOC


From: Giuseppe Modugno
Subject: Re: [lwip-users] Problems when setting MEMP_MEM_MALLOC
Date: Thu, 15 Mar 2018 11:18:49 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Il 14/03/2018 20:24, address@hidden ha scritto:
On 14.03.2018 17:09, Giuseppe Modugno wrote:
#define MEM_LIBC_MALLOC   1

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

I suspect threading issues. I checked on win32 and it seems to work fine. In the end, there's not really much lwIP does here, everything is delegated to your C library's malloc code. Maybe that code isn't thread-safe? In that case, you need to define mem_clib_*() to wrapper functions that protect the heap.

I'm using NewlibNano as C library. However I'm using NOSYS=1 and I don't use threads. In my application, "threads" are only interrupt service routines, but I don't call mem_malloc from any ISR (I don't think lwip uses interrupts at all).

So I don't think it is caused by a threading issue.




reply via email to

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