[PATCH] malloc: Cleanup madvise defines

Florian Weimer fweimer@redhat.com
Mon Aug 4 08:59:18 GMT 2025


* Wilco Dijkstra:

> -#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.

Thanks,
Florian



More information about the Libc-alpha mailing list