Lines Matching refs:size
22 unsigned long size; member
35 static void *simple_malloc(unsigned long size) in simple_malloc() argument
40 if (size == 0) in simple_malloc()
43 size = _ALIGN_UP(size, alloc_min); in simple_malloc()
47 if (size <= space_left) { in simple_malloc()
49 p->size = size; in simple_malloc()
51 next_base += size; in simple_malloc()
52 space_left -= size; in simple_malloc()
58 else if (!(p->flags & ENTRY_IN_USE) && (size <= p->size)) { in simple_malloc()
95 static void *simple_realloc(void *ptr, unsigned long size) in simple_realloc() argument
100 if (size == 0) { in simple_realloc()
106 return simple_malloc(size); in simple_realloc()
111 if (size <= p->size) /* fits in current block */ in simple_realloc()
114 new = simple_malloc(size); in simple_realloc()
116 memcpy(new, ptr, p->size); in simple_realloc()