Lines Matching full:heap
73 struct nolibc_heap *heap; in free() local
78 heap = container_of(ptr, struct nolibc_heap, user_p); in free()
79 munmap(heap, heap->len); in free()
134 struct nolibc_heap *heap; in malloc() local
137 len = sizeof(*heap) + len; in malloc()
139 heap = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, in malloc()
141 if (__builtin_expect(heap == MAP_FAILED, 0)) in malloc()
144 heap->len = len; in malloc()
145 return heap->user_p; in malloc()
159 * No need to zero the heap, the MAP_ANONYMOUS in malloc() in calloc()
168 struct nolibc_heap *heap; in realloc() local
175 heap = container_of(old_ptr, struct nolibc_heap, user_p); in realloc()
176 user_p_len = heap->len - sizeof(*heap); in realloc()
189 memcpy(ret, heap->user_p, user_p_len); in realloc()
190 munmap(heap, heap->len); in realloc()