Lines Matching defs:rmem

225  * @param rmem is the pointer as returned by a previous call to mem_malloc()
228 mem_free(void *rmem)
230 LWIP_ASSERT("rmem != NULL", (rmem != NULL));
231 LWIP_ASSERT("rmem == MEM_ALIGN(rmem)", (rmem == LWIP_MEM_ALIGN(rmem)));
233 rmem = (u8_t *)rmem - MEM_LIBC_STATSHELPER_SIZE;
234 MEM_STATS_DEC_USED_LOCKED(used, *(mem_size_t *)rmem);
236 mem_clib_free(rmem);
305 * @param rmem the memory element to free
308 mem_free(void *rmem)
312 LWIP_ASSERT("rmem != NULL", (rmem != NULL));
313 LWIP_ASSERT("rmem == MEM_ALIGN(rmem)", (rmem == LWIP_MEM_ALIGN(rmem)));
317 hmem = (struct memp_malloc_helper *)(void *)((u8_t *)rmem - LWIP_MEM_ALIGN_SIZE(sizeof(struct memp_malloc_helper)));
331 u8_t data = *((u8_t *)rmem + i);
613 * @param rmem is the data portion of a struct mem as returned by a previous
617 mem_free(void *rmem)
622 if (rmem == NULL) {
626 if ((((mem_ptr_t)rmem) & (MEM_ALIGNMENT - 1)) != 0) {
636 mem = (struct mem *)(void *)((u8_t *)rmem - (SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET));
638 if ((u8_t *)mem < ram || (u8_t *)rmem + MIN_SIZE_ALIGNED > (u8_t *)ram_end) {
691 * @param rmem pointer to memory allocated by mem_malloc the is to be shrinked
694 * @return for compatibility reasons: is always == rmem, at the moment
695 * or NULL if newsize is > old size, in which case rmem is NOT touched
699 mem_trim(void *rmem, mem_size_t new_size)
721 LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram &&
722 (u8_t *)rmem < (u8_t *)ram_end);
724 if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) {
728 return rmem;
732 mem = (struct mem *)(void *)((u8_t *)rmem - (SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET));
747 return rmem;
819 return rmem;