[Top][All Lists]

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

Re: [lwip-users] Fw: problem in memp_alloc()

From: Francois Bouchard
Subject: Re: [lwip-users] Fw: problem in memp_alloc()
Date: Wed, 1 Jul 2009 10:41:37 -0400

Thanks for your help.
In my case pbuf_alloc( PBUF_RAW, pNBuf->length, PBUF_POOL) is calling memp_malloc().  It worked on another project slightly different than the one I'm trying to debug.  The other project that works has different memory map settings and don't use standard libraries, but lwipopts.h and opt.h are the same.
I'll will try calling pbuf_alloc() with PBUF_RAM so it'll call mem_malloc.
----- Original Message -----
Sent: Sunday, June 28, 2009 6:58 PM
Subject: Re: [lwip-users] Fw: problem in memp_alloc()

That LWIP_ERROR is checking that memp_malloc() was called with a valid memory type. It isn't related to MEMP_OVERFLOW_CHECK.
Whatever is calling memp_malloc() has specified an illegal value for the memory pool from which an allocation is to occur. Perhaps something is trying to call this function with the number of bytes to allocate? If so, the caller should use mem_malloc() instead.
You should be able to spot the problem if you can set a breakpoint on the LWIP_ERROR. What value is 'type' and who called memp_malloc() with the bogus argument?
----- Original Message -----
Sent: Saturday, June 27, 2009 4:26 AM
Subject: [lwip-users] Fw: problem in memp_alloc()

Hi all,
I have made a new lwIP 1.3.0 project (with no OS) based on a project that runs well.  Now this new project fails to initialize. I got a system assert in memp_malloc(): LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;)
I did'nt change any options in files opt.h or lwiopts.h, and my settings has always been to define MEMP_OVERFLOW_CHECK  0.
any idea of option I could do to debug that?
I've tried to define MEMP_OVERFLOW_CHCK to 1 and to 2, but the cpu hangs somewhere in memp_overflow_check_all().(But this problem is not lwip related).

lwip-users mailing list

reply via email to

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