Skip to content

Conversation

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented Sep 14, 2021

WebAssembly doesn't reserve low addresses but without "extra inhabitants" of
the pointer representation, runtime performance and memory footprint are
worse. So assume that compiler driver uses wasm-ld and --global-base=1024 to
reserve low 1KB.

@MaxDesiatov
Copy link
Contributor

@swift-ci please smoke test

WebAssembly doesn't reserve low addresses but without "extra inhabitants" of
the pointer representation, runtime performance and memory footprint are
worse. So assume that compiler driver uses wasm-ld and --global-base=1024 to
reserve low 1KB.
@kateinoigakukun kateinoigakukun force-pushed the katei/wasm-least-valid-addr branch from 74e5f37 to 6fd3ae7 Compare April 3, 2022 07:01
@MaxDesiatov
Copy link
Contributor

Hi @rjmccall, would you have a moment to take a look at this PR?

@tbkka
Copy link
Contributor

tbkka commented May 24, 2022

I'd personally be happier with 4096 here (same as other Swift 32-bit platforms, minimizes the chance of unexpected dependencies you'll have to track down later).

@MaxDesiatov MaxDesiatov requested a review from tbkka May 24, 2022 17:59
@MaxDesiatov
Copy link
Contributor

@swift-ci please smoke test

@MaxDesiatov
Copy link
Contributor

@tbkka thanks, that's updated now. Do you think there's anything else to be done here for a review approval?

@tbkka
Copy link
Contributor

tbkka commented May 24, 2022

@swift-ci Please test

@kateinoigakukun
Copy link
Member Author

Thank you for your review and follow-up!

@kateinoigakukun kateinoigakukun merged commit 594d3ad into swiftlang:main May 25, 2022
@kateinoigakukun kateinoigakukun deleted the katei/wasm-least-valid-addr branch May 25, 2022 05:31
kateinoigakukun added a commit to kateinoigakukun/swift that referenced this pull request Sep 15, 2025
…resses

WebAssembly does not have a reserved address space by default, so we
need to explicitly reserve low addresses for extra inhabitants for
enum types with pointer payloads. swiftlang#39300
added `--global-base` to reserve low data addresses, but we also need
to reserve low function addresses with `--table-base` for function
pointers because WebAssembly uses a separate address space for function
pointers.
kateinoigakukun added a commit to kateinoigakukun/swift-driver that referenced this pull request Sep 15, 2025
WebAssembly does not have a reserved address space by default, so we
need to explicitly reserve low addresses for extra inhabitants for
enum types with pointer payloads. swiftlang/swift#39300
added `--global-base` to reserve low data addresses, but we also need
to reserve low function addresses with `--table-base` for function
pointers because WebAssembly uses a separate address space for function
pointers.
kateinoigakukun added a commit to kateinoigakukun/swift-driver that referenced this pull request Sep 15, 2025
WebAssembly does not have a reserved address space by default, so we
need to explicitly reserve low addresses for extra inhabitants for
enum types with pointer payloads. swiftlang/swift#39300
added `--global-base` to reserve low data addresses, but we also need
to reserve low function addresses with `--table-base` for function
pointers because WebAssembly uses a separate address space for function
pointers.
kateinoigakukun added a commit to kateinoigakukun/swift that referenced this pull request Sep 15, 2025
…resses

WebAssembly does not have a reserved address space by default, so we
need to explicitly reserve low addresses for extra inhabitants for
enum types with pointer payloads. swiftlang#39300
added `--global-base` to reserve low data addresses, but we also need
to reserve low function addresses with `--table-base` for function
pointers because WebAssembly uses a separate address space for function
pointers.
kateinoigakukun added a commit to kateinoigakukun/swift-driver that referenced this pull request Sep 15, 2025
WebAssembly does not have a reserved address space by default, so we
need to explicitly reserve low addresses for extra inhabitants for
enum types with pointer payloads. swiftlang/swift#39300
added `--global-base` to reserve low data addresses, but we also need
to reserve low function addresses with `--table-base` for function
pointers because WebAssembly uses a separate address space for function
pointers.
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.

3 participants