[PATCH] malloc: Cleanup madvise defines
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Mon Aug 4 12:37:22 GMT 2025
Hi Florian,
> -#ifdef MADV_HUGEPAGE
> /* Defined in brk.c. */
> extern void *__curbrk;
> if (__glibc_unlikely (mp_.thp_pagesize != 0))
> @@ -2710,7 +2704,6 @@ sysmalloc (INTERNAL_SIZE_T nb, mstate av)
> size = top - (uintptr_t) __curbrk;
> }
> else
> -#endif
> This change breaks the Hurd build because __curbrk doees not exist on
> Hurd. Previously, this worked because MADV_HUGEPAGE was not defined,
> either.
Right, that looks like an internal brk variable that probably shouldn't ever be
used (can't be threadsafe either!). So we just need to use MORECORE (0) here -
I'll post a fix.
Cheers,
Wilco
More information about the Libc-alpha
mailing list