Skip to content

Conversation

giordano
Copy link
Member

PAGESIZE is currently fixed at compile time, but the machine where Julia runs
may have a different memory page size than the one where the stdlib was compiled
on. It's not worth making this a OncePerProcess object because the underlying
function call is very cheap, cheaper than the overhead of OncePerProcess.

This is somewhat breaking for those packages which referred to the non-public Mmap.PAGESIZE symbol, luckily they are only three.

giordano and others added 2 commits October 1, 2025 00:17
`PAGESIZE` is currently fixed at compile time, but the machine where Julia runs
may have a different memory page size than the one where the stdlib was compiled
on.  It's not worth making this a `OncePerProcess` object because the underlying
function call is very cheap, cheaper than the overhead of `OncePerProcess`.
@Keno
Copy link
Member

Keno commented Oct 1, 2025

I think this is probably a good change, but the page size issue is also a problem for page alignment in linked files. Are we sure this will actually work for precompile files? Perhaps we should separate the concept of "you must not assume page size smaller than this" and "this is the current system's page size"?

@vtjnash
Copy link
Member

vtjnash commented Oct 1, 2025

@Keno why is the linker relevant to this? That seems like a linker or patchelf bug instead? e.g.
lovell/sharp-libvips#45 (comment)

@Keno
Copy link
Member

Keno commented Oct 1, 2025

The alignment is a linker setting. The default is 64k now, so there's no problem, but my point is just that the there still is some build-time value for this, so we should possibly separate the concepts. If only to be ready for when someone decides that 1MB is the correct page granularity ;).

@vtjnash
Copy link
Member

vtjnash commented Oct 1, 2025

Gotcha, that sounds unrelated to this PR in that case, and would likely be Base.Linking.MAXPAGESIZE::Int if it comes up later

@Keno
Copy link
Member

Keno commented Oct 1, 2025

It's related in that they're currently kind of the same concept so we may want to add it and mention both in whatever transition guidance we provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants