diff options
Diffstat (limited to 'malloc/malloc-check.c')
-rw-r--r-- | malloc/malloc-check.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/malloc/malloc-check.c b/malloc/malloc-check.c index da1158b..f5ca5fb 100644 --- a/malloc/malloc-check.c +++ b/malloc/malloc-check.c @@ -1,5 +1,5 @@ /* glibc.malloc.check implementation. - Copyright (C) 2001-2024 Free Software Foundation, Inc. + Copyright (C) 2001-2025 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -111,7 +111,7 @@ mem2chunk_check (void *mem, unsigned char **magic_p) INTERNAL_SIZE_T sz, c; unsigned char magic; - if (!aligned_OK (mem)) + if (misaligned_mem (mem)) return NULL; p = mem2chunk (mem); @@ -235,7 +235,7 @@ free_check (void *mem) { /* Mark the chunk as belonging to the library again. */ (void)tag_region (chunk2mem (p), memsize (p)); - _int_free (&main_arena, p, 1); + _int_free_chunk (&main_arena, p, chunksize (p), 1); __libc_lock_unlock (main_arena.mutex); } __set_errno (err); @@ -245,7 +245,7 @@ static void * realloc_check (void *oldmem, size_t bytes) { INTERNAL_SIZE_T chnb; - void *newmem = 0; + void *newmem = NULL; unsigned char *magic_p; size_t rb; @@ -254,7 +254,7 @@ realloc_check (void *oldmem, size_t bytes) __set_errno (ENOMEM); return NULL; } - if (oldmem == 0) + if (oldmem == NULL) return malloc_check (bytes); if (bytes == 0) @@ -389,7 +389,7 @@ initialize_malloc_check (void) { /* This is the copy of the malloc initializer that we pulled in along with malloc-check. This does not affect any of the libc malloc structures. */ - ptmalloc_init (); + __ptmalloc_init (); TUNABLE_GET (check, int32_t, TUNABLE_CALLBACK (set_mallopt_check)); return __is_malloc_debug_enabled (MALLOC_CHECK_HOOK); } |