diff options
| author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-12-06 03:33:06 +0000 |
|---|---|---|
| committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-12-06 03:33:06 +0000 |
| commit | bd7bace793536f027790396d6358c14299e8595b (patch) | |
| tree | dcc993baefecea2b27019336c4502e61d49b98c5 /libc/stdlib/malloc | |
| parent | 7608c85140162446c3830421eb94ae42a1bbb893 (diff) | |
| download | uClibc-alpine-bd7bace793536f027790396d6358c14299e8595b.tar.bz2 uClibc-alpine-bd7bace793536f027790396d6358c14299e8595b.tar.xz | |
Big merge from trunk. Stop the madness!
Diffstat (limited to 'libc/stdlib/malloc')
| -rw-r--r-- | libc/stdlib/malloc/free.c | 2 | ||||
| -rw-r--r-- | libc/stdlib/malloc/heap.h | 10 | ||||
| -rw-r--r-- | libc/stdlib/malloc/malloc_debug.c | 2 |
3 files changed, 5 insertions, 9 deletions
diff --git a/libc/stdlib/malloc/free.c b/libc/stdlib/malloc/free.c index 88684e6df..eb35e78ee 100644 --- a/libc/stdlib/malloc/free.c +++ b/libc/stdlib/malloc/free.c @@ -11,6 +11,8 @@ * Written by Miles Bader <miles@gnu.org> */ +#define munmap __munmap + #include <stdlib.h> #include <unistd.h> #include <sys/mman.h> diff --git a/libc/stdlib/malloc/heap.h b/libc/stdlib/malloc/heap.h index 0210d9098..ab1a73896 100644 --- a/libc/stdlib/malloc/heap.h +++ b/libc/stdlib/malloc/heap.h @@ -135,14 +135,8 @@ extern void __heap_dump (struct heap *heap, const char *str); extern void __heap_check (struct heap *heap, const char *str); -#ifdef HEAP_USE_LOCKING -# define __heap_lock(heap) __pthread_mutex_lock (&(heap)->lock) -# define __heap_unlock(heap) __pthread_mutex_unlock (&(heap)->lock) -#else /* !__UCLIBC_HAS_THREADS__ */ -/* Without threads, mutex operations are a nop. */ -# define __heap_lock(heap) (void)0 -# define __heap_unlock(heap) (void)0 -#endif /* HEAP_USE_LOCKING */ +#define __heap_lock(heap) __pthread_mutex_lock (&(heap)->lock) +#define __heap_unlock(heap) __pthread_mutex_unlock (&(heap)->lock) /* Delete the free-area FA from HEAP. */ diff --git a/libc/stdlib/malloc/malloc_debug.c b/libc/stdlib/malloc/malloc_debug.c index d231fa7b6..b93b1eac6 100644 --- a/libc/stdlib/malloc/malloc_debug.c +++ b/libc/stdlib/malloc/malloc_debug.c @@ -55,7 +55,7 @@ __malloc_debug_printf (int indent, const char *fmt, ...) void __malloc_debug_init (void) { - char *ev = getenv ("MALLOC_DEBUG"); + char *ev = __getenv ("MALLOC_DEBUG"); if (ev) { int val = atoi (ev); |
