mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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>
This commit is contained in:
@ -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 *
|
||||
|
Reference in New Issue
Block a user