From 35d29fcb08fadaf006561a058746b0fce76a6a74 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 18 Jul 2002 15:00:07 +0000 Subject: Miles Bader implemented a new mmap based malloc which is much smarter than the old "malloc-simple", and actually works, unlike the old "malloc". So kill the old "malloc-simple" and the old "malloc" and replace them with Miles' new malloc implementation. Update Config files to match. Thanks Miles! --- libc/stdlib/malloc/alloc.c | 60 ---------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 libc/stdlib/malloc/alloc.c (limited to 'libc/stdlib/malloc/alloc.c') diff --git a/libc/stdlib/malloc/alloc.c b/libc/stdlib/malloc/alloc.c deleted file mode 100644 index 99537a35d..000000000 --- a/libc/stdlib/malloc/alloc.c +++ /dev/null @@ -1,60 +0,0 @@ -#include -#include -#include -#include -#include -#include - - -#ifdef L_calloc_dbg - -void *calloc_dbg(size_t num, size_t size, char *function, char *file, - int line) -{ - void *ptr; - - fprintf(stderr, "calloc of %ld bytes at %s @%s:%d = ", - (long) (num * size), function, file, line); - ptr = calloc(num, size); - fprintf(stderr, "%p\n", ptr); - return ptr; -} - -#endif - -#ifdef L_malloc_dbg - -void *malloc_dbg(size_t len, char *function, char *file, int line) -{ - void *result; - - fprintf(stderr, "malloc of %ld bytes at %s @%s:%d = ", (long) len, - function, file, line); - result = malloc(len); - fprintf(stderr, "%p\n", result); - return result; -} - -#endif - -#ifdef L_free_dbg - -void free_dbg(void *ptr, char *function, char *file, int line) -{ - fprintf(stderr, "free of %p at %s @%s:%d\n", ptr, function, file, - line); - free(ptr); -} - -#endif - -#ifdef L_realloc_dbg -void *realloc_dbg(void *ptr, size_t size, char *function, char *file, int line) -{ - fprintf(stderr, "realloc of %p to %ld bytes at %s @%s;%d = ", ptr, - (long)size, function, file, line); - ptr = realloc(ptr, size); - fprintf(stderr, "%p\n", ptr); - return ptr; -} -#endif -- cgit v1.2.3