Project

General

Profile

Actions

Bug #17850

closed

`PAGE_SIZE` is no longer a constant for macOS

Bug #17850: `PAGE_SIZE` is no longer a constant for macOS

Added by xtkoba (Tee KOBAYASHI) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Target version:
-
[ruby-core:103727]

Description

Build failure for macOS Big Sur (ARM) due to -Wundef (#17752).

It is said in https://www.wwdcnotes.com/notes/wwdc20/10214/ that:

  • Native page size on Intel is 4 kB, on Apple Silicon it's 16 kB: therefore the PAGE_SIZE macro is no longer a constant. Use:
  • PAGE_MAX_SIZE for a compile-time upper bound
  • vm_page_size to read the actual value at runtime

Related issues 1 (0 open1 closed)

Related to Ruby - Feature #17752: Enable -Wundef for C extensions in repositoryClosedEregon (Benoit Daloze)Actions

Updated by Eregon (Benoit Daloze) over 4 years ago Actions #1

  • Related to Feature #17752: Enable -Wundef for C extensions in repository added

Updated by Eregon (Benoit Daloze) over 4 years ago Actions #2 [ruby-core:103734]

I wonder why Apple didn't simply define PAGE_SIZE conditionally based on the architecture.

Updated by peterzhu2118 (Peter Zhu) over 4 years ago Actions #3 [ruby-core:103735]

  • Assignee set to peterzhu2118 (Peter Zhu)

Updated by peterzhu2118 (Peter Zhu) over 4 years ago Actions #4 [ruby-core:103736]

Thank you. I'm looking into this.

Updated by peterzhu2118 (Peter Zhu) over 4 years ago Actions #5

  • Backport changed from 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN to 2.6: DONTNEED, 2.7: DONTNEED, 3.0: DONTNEED

Updated by mame (Yusuke Endoh) over 4 years ago Actions #6 [ruby-core:103747]

  • Status changed from Open to Closed

@nobu (Nobuyoshi Nakada) seemed to fix this issue by 3d5b6ddff8def49e59fb9a9ddd28a653498ae861 and 192150051144c0242ee44df26952dfe31b83cac2

Actions

Also available in: PDF Atom