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 ----- 
  From: Francois Bouchard 
  To: [email protected] 
  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).

  FB
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to