Files
kitty/tools/utils/shm/fallocate_other.go
Kovid Goyal 2e4f3dab41 Use fallocate() rather than truncate() when creating SHM memory
With truncate() the OS might not actually allocate the space leading to
a SIGBUS if /dev/shm runs out of space when actually using the mmap.

By using fallocate we ensure that once the SHM mmap is created it wont
fail
2023-09-23 09:53:17 +05:30

17 lines
259 B
Go

// License: GPLv3 Copyright: 2023, Kovid Goyal, <kovid at kovidgoyal.net>
//go:build !darwin && !linux
package shm
import (
"fmt"
"golang.org/x/sys/unix"
)
var _ = fmt.Print
func Fallocate_simple(fd int, size int64) (err error) {
return unix.ENOSYS
}