9 void *__expand_heap(size_t *);
11 static void *__simple_malloc(size_t n
)
13 static char *cur
, *end
;
14 static volatile int lock
[2];
19 while (align
<n
&& align
<ALIGN
)
24 pad
= -(uintptr_t)cur
& align
-1;
26 if (n
<= SIZE_MAX
/2 + ALIGN
) n
+= pad
;
30 char *new = __expand_heap(&m
);
49 weak_alias(__simple_malloc
, malloc
);
50 weak_alias(__simple_malloc
, __malloc0
);