aboutsummaryrefslogtreecommitdiff
path: root/malloc
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2021-03-12 14:30:10 +0000
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2021-03-26 11:03:06 +0000
commit05f878c58e53370a76c2b82679899936bc69c714 (patch)
tree854650a8fb932591b2a59cab024f41f3c2b5da07 /malloc
parentca89f1c7d7aa76d6f8eedadd99f6c2e9c8053714 (diff)
downloadglibc-05f878c58e53370a76c2b82679899936bc69c714.tar
glibc-05f878c58e53370a76c2b82679899936bc69c714.tar.gz
glibc-05f878c58e53370a76c2b82679899936bc69c714.tar.bz2
glibc-05f878c58e53370a76c2b82679899936bc69c714.zip
malloc: Remove unnecessary tagging around _mid_memalign
The internal _mid_memalign already returns newly tagged memory. (__libc_memalign and posix_memalign already relied on this, this patch fixes the other call sites.) Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'malloc')
-rw-r--r--malloc/malloc.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 432b042f25..7c44b4f96d 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -3553,22 +3553,17 @@ libc_hidden_def (__libc_memalign)
void *
__libc_valloc (size_t bytes)
{
- void *p;
-
if (__malloc_initialized < 0)
ptmalloc_init ();
void *address = RETURN_ADDRESS (0);
size_t pagesize = GLRO (dl_pagesize);
- p = _mid_memalign (pagesize, bytes, address);
- return tag_new_usable (p);
+ return _mid_memalign (pagesize, bytes, address);
}
void *
__libc_pvalloc (size_t bytes)
{
- void *p;
-
if (__malloc_initialized < 0)
ptmalloc_init ();
@@ -3585,8 +3580,7 @@ __libc_pvalloc (size_t bytes)
}
rounded_bytes = rounded_bytes & -(pagesize - 1);
- p = _mid_memalign (pagesize, rounded_bytes, address);
- return tag_new_usable (p);
+ return _mid_memalign (pagesize, rounded_bytes, address);
}
void *