220 |
((u32_t)MEM_ALIGN((u8_t *)memp + sizeof(struct memp)) % MEM_ALIGNMENT) == 0); |
((u32_t)MEM_ALIGN((u8_t *)memp + sizeof(struct memp)) % MEM_ALIGNMENT) == 0); |
221 |
|
|
222 |
mem = MEM_ALIGN((u8_t *)memp + sizeof(struct memp)); |
mem = MEM_ALIGN((u8_t *)memp + sizeof(struct memp)); |
|
/* initialize memp memory with zeroes */ |
|
|
memset(mem, 0, memp_sizes[type]); |
|
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 %d\n", type)); |