diff options
Diffstat (limited to 'libc/stdlib/malloc')
-rw-r--r-- | libc/stdlib/malloc/heap_debug.c | 4 | ||||
-rw-r--r-- | libc/stdlib/malloc/malloc.h | 2 | ||||
-rw-r--r-- | libc/stdlib/malloc/malloc_debug.c | 4 |
3 files changed, 6 insertions, 4 deletions
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.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); } |