aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/syscall
diff options
context:
space:
mode:
authorRandy Reddig <[email protected]>2024-03-04 10:31:13 -0800
committerRon Evans <[email protected]>2024-03-27 16:01:40 +0100
commit32a056c32a38729c96c47aeaa5bf69cd7209a7bf (patch)
tree8ca25d54f811e19588ced87a731a172ccb8fc844 /src/syscall
parent8e8ad9004f165716e64676ec534def097594484a (diff)
downloadtinygo-32a056c32a38729c96c47aeaa5bf69cd7209a7bf.tar.gz
tinygo-32a056c32a38729c96c47aeaa5bf69cd7209a7bf.zip
syscall: use libc_getpagesize instead of hard-coded constant
TODO: should Getpagesize on wasip1 just return wasmPageSize?
Diffstat (limited to 'src/syscall')
-rw-r--r--src/syscall/syscall_libc_wasip1.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/syscall/syscall_libc_wasip1.go b/src/syscall/syscall_libc_wasip1.go
index eff7d5a5f..5242690cc 100644
--- a/src/syscall/syscall_libc_wasip1.go
+++ b/src/syscall/syscall_libc_wasip1.go
@@ -397,16 +397,9 @@ func Chmod(path string, mode uint32) (err error) {
return Lstat(path, &stat)
}
-// wasmPageSize is the size of a page in WebAssembly's 32-bit memory. This
-// is also its only unit of change.
-//
-// See https://www.w3.org/TR/wasm-core-1/#page-size
-//
-// FIXME: this is also defined in package runtime.
-const wasmPageSize = 64 * 1024
-
+// TODO: should this return runtime.wasmPageSize?
func Getpagesize() int {
- return wasmPageSize
+ return libc_getpagesize()
}
type Utsname struct {