Hello, I am trying to port lwip to uc/os (I use lwip 1.4.1). But I get on packet recieve, immediately at first try "out of memory in pool " error as following: " pbuf_alloc(length= 96) memp_malloc: out of memory in pool PBUF_POOL pbuf_alloc: allocated pbuf 0"
I observed memp_malloc(memp_t) routine but not sure I undetsand how it works, and why it fails. What reason could be for memp = memp_tab[type]; returning null ? Is memp_tab allocated static at compile time ? Does it mean some configuration parameter is wrong (lwipopts.h) ? memp_malloc(memp_t type) { struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); SYS_ARCH_PROTECT(old_level); #if MEMP_OVERFLOW_CHECK >= 2 memp_overflow_check_all(); #endif /* MEMP_OVERFLOW_CHECK >= 2 */ memp = memp_tab[type]; if (memp != NULL) { .... } else { LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", memp_desc[type])); MEMP_STATS_INC(err, type); } Best Regards, Ran _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users