Lines Matching refs:heap
94 struct nolibc_heap *heap; in free() local
99 heap = container_of(ptr, struct nolibc_heap, user_p); in free()
100 munmap(heap, heap->len); in free()
129 struct nolibc_heap *heap; in malloc() local
132 len = sizeof(*heap) + len; in malloc()
134 heap = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, in malloc()
136 if (__builtin_expect(heap == MAP_FAILED, 0)) in malloc()
139 heap->len = len; in malloc()
140 return heap->user_p; in malloc()
163 struct nolibc_heap *heap; in realloc() local
170 heap = container_of(old_ptr, struct nolibc_heap, user_p); in realloc()
171 user_p_len = heap->len - sizeof(*heap); in realloc()
184 memcpy(ret, heap->user_p, user_p_len); in realloc()
185 munmap(heap, heap->len); in realloc()