124 |
static int |
static int |
125 |
memp_sanity(void) |
memp_sanity(void) |
126 |
{ |
{ |
127 |
int i, c; |
s16_t i, c; |
128 |
struct memp *m, *n; |
struct memp *m, *n; |
129 |
|
|
130 |
for(i = 0; i < MEMP_MAX; i++) { |
for(i = 0; i < MEMP_MAX; i++) { |
222 |
mem = MEM_ALIGN((u8_t *)memp + sizeof(struct memp)); |
mem = MEM_ALIGN((u8_t *)memp + sizeof(struct memp)); |
223 |
return mem; |
return mem; |
224 |
} else { |
} else { |
225 |
LWIP_DEBUGF(MEMP_DEBUG | 2, ("memp_malloc: out of memory in pool %d\n", type)); |
LWIP_DEBUGF(MEMP_DEBUG | 2, ("memp_malloc: out of memory in pool %"S16_F"\n", type)); |
226 |
#if MEMP_STATS |
#if MEMP_STATS |
227 |
++lwip_stats.memp[type].err; |
++lwip_stats.memp[type].err; |
228 |
#endif /* MEMP_STATS */ |
#endif /* MEMP_STATS */ |