mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-22 05:19:03 +00:00
syscall: use libc_getpagesize instead of hard-coded constant
TODO: should Getpagesize on wasip1 just return wasmPageSize?
This commit is contained in:
@@ -397,16 +397,9 @@ func Chmod(path string, mode uint32) (err error) {
|
|||||||
return Lstat(path, &stat)
|
return Lstat(path, &stat)
|
||||||
}
|
}
|
||||||
|
|
||||||
// wasmPageSize is the size of a page in WebAssembly's 32-bit memory. This
|
// TODO: should this return runtime.wasmPageSize?
|
||||||
// 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
|
|
||||||
|
|
||||||
func Getpagesize() int {
|
func Getpagesize() int {
|
||||||
return wasmPageSize
|
return libc_getpagesize()
|
||||||
}
|
}
|
||||||
|
|
||||||
type Utsname struct {
|
type Utsname struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user