Skip to content

Commit 6915a36

Browse files
[NFC][wasm] Fix incorrect comment about reserved low addresses
1 parent 687e09d commit 6915a36

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/Driver/WebAssemblyToolChains.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ toolchains::WebAssembly::constructInvocation(const DynamicLinkJobAction &job,
188188

189189
// WebAssembly doesn't reserve low addresses But without "extra inhabitants"
190190
// of the pointer representation, runtime performance and memory footprint are
191-
// worse. So assume that compiler driver uses wasm-ld and --global-base=1024
192-
// to reserve low 1KB.
191+
// worse. So assume that compiler driver uses wasm-ld and --global-base=4096
192+
// to reserve low 4KB.
193193
Arguments.push_back("-Xlinker");
194194
Arguments.push_back(context.Args.MakeArgString(
195195
Twine("--global-base=") +

stdlib/public/SwiftShims/swift/shims/System.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@
220220

221221
// WebAssembly doesn't reserve low addresses. But without "extra inhabitants" of
222222
// the pointer representation, runtime performance and memory footprint are
223-
// worse. So assume that compiler driver uses wasm-ld and --global-base=1024 to
224-
// reserve low 1KB.
223+
// worse. So assume that compiler driver uses wasm-ld and --global-base=4096 to
224+
// reserve low 4KB.
225225
#define SWIFT_ABI_WASM32_LEAST_VALID_POINTER 4096
226226

227227
#endif // SWIFT_STDLIB_SHIMS_ABI_SYSTEM_H

0 commit comments

Comments
 (0)