Lines Matching refs:rmem
127 * @param rmem the memory element to free
130 mem_free(void *rmem)
134 LWIP_ASSERT("rmem != NULL", (rmem != NULL));
135 LWIP_ASSERT("rmem == MEM_ALIGN(rmem)", (rmem == LWIP_MEM_ALIGN(rmem)));
138 hmem = (struct memp_malloc_helper*)(void*)((u8_t*)rmem - LWIP_MEM_ALIGN_SIZE(sizeof(struct memp_malloc_helper)));
307 * @param rmem is the data portion of a struct mem as returned by a previous
311 mem_free(void *rmem)
316 if (rmem == NULL) {
320 LWIP_ASSERT("mem_free: sanity check alignment", (((mem_ptr_t)rmem) & (MEM_ALIGNMENT-1)) == 0);
322 LWIP_ASSERT("mem_free: legal memory", (u8_t *)rmem >= (u8_t *)ram &&
323 (u8_t *)rmem < (u8_t *)ram_end);
325 if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) {
337 mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM);
361 * @param rmem pointer to memory allocated by mem_malloc the is to be shrinked
364 * @return for compatibility reasons: is always == rmem, at the moment
365 * or NULL if newsize is > old size, in which case rmem is NOT touched
369 mem_trim(void *rmem, mem_size_t newsize)
390 LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram &&
391 (u8_t *)rmem < (u8_t *)ram_end);
393 if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) {
400 return rmem;
403 mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM);
415 return rmem;
481 return rmem;