projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix dlsym of thread-local symbols on archs with DTP_OFFSET!=0
[musl]
/
src
/
malloc
/
lite_malloc.c
diff --git
a/src/malloc/lite_malloc.c
b/src/malloc/lite_malloc.c
index
29cccb1
..
050d84f
100644
(file)
--- a/
src/malloc/lite_malloc.c
+++ b/
src/malloc/lite_malloc.c
@@
-2,12
+2,11
@@
#include <stdint.h>
#include <limits.h>
#include <errno.h>
#include <stdint.h>
#include <limits.h>
#include <errno.h>
-#include "libc.h"
+#include "lock.h"
+#include "malloc_impl.h"
#define ALIGN 16
#define ALIGN 16
-void *__expand_heap(size_t *);
-
static void *__simple_malloc(size_t n)
{
static char *cur, *end;
static void *__simple_malloc(size_t n)
{
static char *cur, *end;
@@
-50,7
+49,7
@@
weak_alias(__simple_malloc, malloc);
static void *__simple_calloc(size_t m, size_t n)
{
static void *__simple_calloc(size_t m, size_t n)
{
- if (n && m > (size_t)-1/n
|| malloc != __simple_malloc
) {
+ if (n && m > (size_t)-1/n) {
errno = ENOMEM;
return 0;
}
errno = ENOMEM;
return 0;
}