diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-01-07 02:32:27 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-01-07 02:32:27 +0000 |
commit | e523bd15353350c3480b8a1820a0944b0fa8212e (patch) | |
tree | 60485116f9c62c306bb753f12f9d4eb79d16aa4e /libc/stdlib/malloc | |
parent | 3b3434516a3415d7e0f4e1d50c553876dcb337b2 (diff) | |
download | uClibc-alpine-e523bd15353350c3480b8a1820a0944b0fa8212e.tar.bz2 uClibc-alpine-e523bd15353350c3480b8a1820a0944b0fa8212e.tar.xz |
Big fricking merge from trunk.
Diffstat (limited to 'libc/stdlib/malloc')
-rw-r--r-- | libc/stdlib/malloc/Makefile.in | 2 | ||||
-rw-r--r-- | libc/stdlib/malloc/free.c | 1 | ||||
-rw-r--r-- | libc/stdlib/malloc/heap_debug.c | 4 | ||||
-rw-r--r-- | libc/stdlib/malloc/malloc.c | 1 | ||||
-rw-r--r-- | libc/stdlib/malloc/malloc.h | 2 | ||||
-rw-r--r-- | libc/stdlib/malloc/malloc_debug.c | 4 |
6 files changed, 9 insertions, 5 deletions
diff --git a/libc/stdlib/malloc/Makefile.in b/libc/stdlib/malloc/Makefile.in index cf61011a4..55831c379 100644 --- a/libc/stdlib/malloc/Makefile.in +++ b/libc/stdlib/malloc/Makefile.in @@ -37,4 +37,4 @@ stdlib_malloc_objclean: malloc.o free.o realloc.o memalign.o: malloc.h # Depend on uClinux_config.h to cache changes in __UCLIBC_MALLOC_DEBUGGING__ -$(STDLIB_MALLOC_OBJ): heap.h $(top_builddir)include/bits/uClibc_config.h +$(STDLIB_MALLOC_OBJ): $(STDLIB_MALLOC_DIR)/heap.h $(top_builddir)include/bits/uClibc_config.h diff --git a/libc/stdlib/malloc/free.c b/libc/stdlib/malloc/free.c index eb35e78ee..81ec38cd9 100644 --- a/libc/stdlib/malloc/free.c +++ b/libc/stdlib/malloc/free.c @@ -12,6 +12,7 @@ */ #define munmap __munmap +#define sbrk __sbrk #include <stdlib.h> #include <unistd.h> diff --git a/libc/stdlib/malloc/heap_debug.c b/libc/stdlib/malloc/heap_debug.c index 4804ba9ee..7dab95627 100644 --- a/libc/stdlib/malloc/heap_debug.c +++ b/libc/stdlib/malloc/heap_debug.c @@ -80,13 +80,13 @@ __heap_check_failure (struct heap *heap, struct heap_free_area *fa, vfprintf (stderr, fmt, val); va_end (val); - putc ('\n', stderr); + __putc ('\n', stderr); __malloc_debug_set_indent (0); __malloc_debug_printf (1, "heap dump:"); __heap_dump_freelist (heap); - exit (22); + __exit (22); } /* Do some consistency checks on HEAP. If they fail, output an error diff --git a/libc/stdlib/malloc/malloc.c b/libc/stdlib/malloc/malloc.c index 44eb2c66f..6bc8d8773 100644 --- a/libc/stdlib/malloc/malloc.c +++ b/libc/stdlib/malloc/malloc.c @@ -12,6 +12,7 @@ */ #define mmap __mmap +#define sbrk __sbrk #include <stdlib.h> #include <unistd.h> diff --git a/libc/stdlib/malloc/malloc.h b/libc/stdlib/malloc/malloc.h index 08ebfdf5b..707cad13d 100644 --- a/libc/stdlib/malloc/malloc.h +++ b/libc/stdlib/malloc/malloc.h @@ -79,6 +79,8 @@ extern struct heap __malloc_mmb_heap; to stderr, when the variable __malloc_mmb_debug is set to true. */ #ifdef MALLOC_MMB_DEBUGGING # include <stdio.h> +extern int __putc(int c, FILE *stream) attribute_hidden; + extern int __malloc_mmb_debug; # define MALLOC_MMB_DEBUG(indent, fmt, args...) \ (__malloc_mmb_debug ? __malloc_debug_printf (indent, fmt , ##args) : 0) diff --git a/libc/stdlib/malloc/malloc_debug.c b/libc/stdlib/malloc/malloc_debug.c index e8711ff77..abe5546ca 100644 --- a/libc/stdlib/malloc/malloc_debug.c +++ b/libc/stdlib/malloc/malloc_debug.c @@ -42,7 +42,7 @@ __malloc_debug_printf (int indent, const char *fmt, ...) while (spaces > 0) { - putc (' ', stderr); + __putc (' ', stderr); spaces--; } @@ -50,7 +50,7 @@ __malloc_debug_printf (int indent, const char *fmt, ...) vfprintf (stderr, fmt, val); va_end (val); - putc ('\n', stderr); + __putc ('\n', stderr); __malloc_debug_indent (indent); } |