HomeFreeBSD

Remove PAGE_SIZE from libthr

Description

Remove PAGE_SIZE from libthr

In libthr we use PAGE_SIZE when allocating memory with mmap and to check
various structs will fit into a single page so we can use this allocator
for them.

Ask the kernel for the page size on init for use by the page allcator
and add a new machine dependent macro to hold the smallest page size
the architecture supports to check the structure is small enough.

This allows us to use the same libthr on arm64 with either 4k or 16k
pages.

Reviewed by: kib, markj, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34984

(cherry picked from commit c7904405a8d47f64c3b0e73158572e2dc8ef0217)

Details

Provenance
andrewAuthored on Apr 7 2022, 4:24 PM
Reviewer
kib
Differential Revision
D34984: Remove PAGE_SIZE from libthr
Parents
rG152c34e2dd8e: Use the existing page size in libthr
Branches
Unknown
Tags
Unknown