mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
Remove use of __curbrk.
This commit is contained in:
@@ -2646,13 +2646,11 @@ sysmalloc (INTERNAL_SIZE_T nb, mstate av)
|
|||||||
previous calls. Otherwise, we correct to page-align below.
|
previous calls. Otherwise, we correct to page-align below.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Defined in brk.c. */
|
|
||||||
extern void *__curbrk;
|
|
||||||
if (__glibc_unlikely (mp_.thp_pagesize != 0))
|
if (__glibc_unlikely (mp_.thp_pagesize != 0))
|
||||||
{
|
{
|
||||||
uintptr_t top = ALIGN_UP ((uintptr_t) __curbrk + size,
|
uintptr_t lastbrk = (uintptr_t) MORECORE (0);
|
||||||
mp_.thp_pagesize);
|
uintptr_t top = ALIGN_UP (lastbrk + size, mp_.thp_pagesize);
|
||||||
size = top - (uintptr_t) __curbrk;
|
size = top - lastbrk;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
size = ALIGN_UP (size, GLRO(dl_pagesize));
|
size = ALIGN_UP (size, GLRO(dl_pagesize));
|
||||||
|
Reference in New Issue
Block a user