Lines Matching full:heap
72 struct nolibc_heap *heap; in free() local
77 heap = container_of(ptr, struct nolibc_heap, user_p); in free()
78 munmap(heap, heap->len); in free()
133 struct nolibc_heap *heap; in malloc() local
136 len = sizeof(*heap) + len; in malloc()
138 heap = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, in malloc()
140 if (__builtin_expect(heap == MAP_FAILED, 0)) in malloc()
143 heap->len = len; in malloc()
144 return heap->user_p; in malloc()
158 * No need to zero the heap, the MAP_ANONYMOUS in malloc() in calloc()
167 struct nolibc_heap *heap; in realloc() local
174 heap = container_of(old_ptr, struct nolibc_heap, user_p); in realloc()
175 user_p_len = heap->len - sizeof(*heap); in realloc()
188 memcpy(ret, heap->user_p, user_p_len); in realloc()
189 munmap(heap, heap->len); in realloc()