Lines Matching refs:size
24 unsigned long size; member
37 static void *simple_malloc(unsigned long size) in simple_malloc() argument
42 if (size == 0) in simple_malloc()
45 size = _ALIGN_UP(size, alloc_min); in simple_malloc()
49 if (size <= space_left) { in simple_malloc()
51 p->size = size; in simple_malloc()
53 next_base += size; in simple_malloc()
54 space_left -= size; in simple_malloc()
60 else if (!(p->flags & ENTRY_IN_USE) && (size <= p->size)) { in simple_malloc()
97 static void *simple_realloc(void *ptr, unsigned long size) in simple_realloc() argument
102 if (size == 0) { in simple_realloc()
108 return simple_malloc(size); in simple_realloc()
113 if (size <= p->size) /* fits in current block */ in simple_realloc()
116 new = simple_malloc(size); in simple_realloc()
117 memcpy(new, ptr, p->size); in simple_realloc()