Lines Matching full:next

105     rt_size_t next, prev;  member
166 nmem = (struct heap_mem *)&heap_ptr[mem->next]; in plug_holes()
171 /* if mem->next is unused and not end of heap_ptr, in plug_holes()
172 * combine mem and mem->next in plug_holes()
178 mem->next = nmem->next; in plug_holes()
179 ((struct heap_mem *)&heap_ptr[nmem->next])->prev = (rt_uint8_t *)mem - heap_ptr; in plug_holes()
191 pmem->next = mem->next; in plug_holes()
192 ((struct heap_mem *)&heap_ptr[mem->next])->prev = (rt_uint8_t *)pmem - heap_ptr; in plug_holes()
236 mem->next = mem_size_aligned + SIZEOF_STRUCT_MEM; in rt_system_heap_init()
244 heap_end = (struct heap_mem *)&heap_ptr[mem->next]; in rt_system_heap_init()
247 heap_end->next = mem_size_aligned + SIZEOF_STRUCT_MEM; in rt_system_heap_init()
307 ptr = ((struct heap_mem *)&heap_ptr[ptr])->next) in rt_malloc()
311 if ((!mem->used) && (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) in rt_malloc()
314 * mem->next - (ptr + SIZEOF_STRUCT_MEM) gives us the 'user data size' of mem */ in rt_malloc()
316 if (mem->next - (ptr + SIZEOF_STRUCT_MEM) >= in rt_malloc()
323 * mem->next - (ptr + (2*SIZEOF_STRUCT_MEM)) == size, in rt_malloc()
324 * struct heap_mem would fit in but no data between mem2 and mem2->next in rt_malloc()
326 * region that couldn't hold data, but when mem->next gets freed, in rt_malloc()
335 mem2->next = mem->next; in rt_malloc()
341 /* and insert it between mem and mem->next */ in rt_malloc()
342 mem->next = ptr2; in rt_malloc()
345 if (mem2->next != mem_size_aligned + SIZEOF_STRUCT_MEM) in rt_malloc()
347 ((struct heap_mem *)&heap_ptr[mem2->next])->prev = ptr2; in rt_malloc()
357 … /* (a mem2 struct does no fit into the user data space of mem and mem->next will always in rt_malloc()
361 * also can't move mem->next directly behind mem, since mem->next in rt_malloc()
366 used_mem += mem->next - ((rt_uint8_t *)mem - heap_ptr); in rt_malloc()
382 /* Find next free block after mem and update lowest free pointer */ in rt_malloc()
384 lfree = (struct heap_mem *)&heap_ptr[lfree->next]; in rt_malloc()
397 (rt_ubase_t)(mem->next - ((rt_uint8_t *)mem - heap_ptr)))); in rt_malloc()
462 size = mem->next - ptr - SIZEOF_STRUCT_MEM; in rt_realloc()
482 mem2->next = mem->next; in rt_realloc()
487 mem->next = ptr2; in rt_realloc()
488 if (mem2->next != mem_size_aligned + SIZEOF_STRUCT_MEM) in rt_realloc()
490 ((struct heap_mem *)&heap_ptr[mem2->next])->prev = ptr2; in rt_realloc()
575 (rt_ubase_t)(mem->next - ((rt_uint8_t *)mem - heap_ptr)))); in rt_free()
603 used_mem -= (mem->next - ((rt_uint8_t *)mem - heap_ptr)); in rt_free()
606 /* finally, see if prev or next are free also */ in rt_free()
643 …(mem = (struct heap_mem *)heap_ptr; mem != heap_end; mem = (struct heap_mem *)&heap_ptr[mem->next]) in FINSH_FUNCTION_EXPORT()
659 rt_kprintf(" size: %d\n", mem->next - position - SIZEOF_STRUCT_MEM); in FINSH_FUNCTION_EXPORT()
678 …(mem = (struct heap_mem *)heap_ptr; mem != heap_end; mem = (struct heap_mem *)&heap_ptr[mem->next]) in memtrace()
685 size = mem->next - position - SIZEOF_STRUCT_MEM; in memtrace()