Lines Matching defs:memp

48 #include "lwip/memp.h"
98 * Check that memp-lists don't form a circle, using "Floyd's cycle-finding algorithm".
103 struct memp *t, *h;
121 * Check if a memp element was victim of an overflow or underflow
124 * @param p the memp element to check
128 memp_overflow_check_element(struct memp *p, const struct memp_desc *desc)
134 * Initialize the restricted area of on memp element.
137 memp_overflow_init_element(struct memp *p, const struct memp_desc *desc)
152 struct memp *p;
157 p = (struct memp *)LWIP_MEM_ALIGN(memp_pools[i]->base);
160 p = LWIP_ALIGNMENT_CAST(struct memp *, ((u8_t *)p + MEMP_SIZE + memp_pools[i]->size + MEM_SANITY_REGION_AFTER_ALIGNED));
181 struct memp *memp;
184 memp = (struct memp *)LWIP_MEM_ALIGN(desc->base);
187 memset(memp, 0, (size_t)desc->num * (MEMP_SIZE + desc->size
193 /* create a linked list of memp elements */
195 memp->next = *desc->tab;
196 *desc->tab = memp;
198 memp_overflow_init_element(memp, desc);
201 memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + desc->size
233 lwip_stats.memp[i] = memp_pools[i]->stats;
250 struct memp *memp;
254 memp = (struct memp *)mem_malloc(MEMP_SIZE + MEMP_ALIGN_SIZE(desc->size));
259 memp = *desc->tab;
262 if (memp != NULL) {
265 memp_overflow_check_element(memp, desc);
268 *desc->tab = memp->next;
270 memp->next = NULL;
274 memp->file = file;
275 memp->line = line;
277 memp_overflow_init_element(memp, desc);
280 LWIP_ASSERT("memp_malloc: memp properly aligned",
281 ((mem_ptr_t)memp % MEM_ALIGNMENT) == 0);
290 return ((u8_t *)memp + MEMP_SIZE);
342 void *memp;
350 memp = do_memp_malloc_pool(memp_pools[type]);
352 memp = do_memp_malloc_pool_fn(memp_pools[type], file, line);
355 return memp;
361 struct memp *memp;
368 memp = (struct memp *)(void *)((u8_t *)mem - MEMP_SIZE);
373 memp_overflow_check_element(memp, desc);
383 mem_free(memp);
385 memp->next = *desc->tab;
386 *desc->tab = memp;
389 LWIP_ASSERT("memp sanity", memp_sanity(desc));
400 * @param mem the memp element to free
417 * @param mem the memp element to free
423 struct memp *old_first;