chore(deps): Update sqlite dependencies

This commit is contained in:
TwiN
2022-12-01 20:19:56 -05:00
parent 080563bd4f
commit cdec353744
564 changed files with 583632 additions and 1166555 deletions

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE-MMAP-GO file.
//go:build darwin || dragonfly || freebsd || linux || openbsd || solaris || netbsd
// +build darwin dragonfly freebsd linux openbsd solaris netbsd
// Modifications (c) 2017 The Memory Authors.
@ -11,7 +12,6 @@ package memory // import "modernc.org/memory"
import (
"os"
"syscall"
"unsafe"
)
const pageSizeLog = 20
@ -33,13 +33,17 @@ func unmap(addr uintptr, size int) error {
// pageSize aligned.
func mmap(size int) (uintptr, int, error) {
size = roundup(size, osPageSize)
b, err := syscall.Mmap(-1, 0, size+pageSize, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_SHARED|syscall.MAP_ANON)
// The actual mmap syscall varies by architecture. mmapSyscall provides same
// functionality as the unexported funtion syscall.mmap and is declared in
// mmap_*_*.go and mmap_fallback.go. To add support for a new architecture,
// check function mmap in src/syscall/syscall_*_*.go or
// src/syscall/zsyscall_*_*.go in Go's source code.
p, err := mmapSyscall(0, uintptr(size+pageSize), syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_PRIVATE|syscall.MAP_ANON, -1, 0)
if err != nil {
return 0, 0, err
}
n := len(b)
p := uintptr(unsafe.Pointer(&b[0]))
n := size + pageSize
if p&uintptr(osPageMask) != 0 {
panic("internal error")
}