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: Nathan Hartman
Subject: Re: [lwip-users] Problems when setting MEMP_MEM_MALLOC
Date: Wed, 14 Mar 2018 16:24:10 -0400

On Mar 14, 2018, at 3:24 PM, "address@hidden" <address@hidden> wrote:
> 
>> 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.

Just a guess: it sounds like your linker script may be placing the heap in the 
wrong place, not allocating one at all, and/or it may not be where your C 
library expects it to be.

It is very important to give your application enough stack and enough heap, and 
to make sure they do not clobber each other as they grow.


reply via email to

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