Bump helm.sh/helm/v3 from 3.10.3 to 3.11.1 (#5528)
This commit is contained in:
3
vendor/github.com/edsrzf/mmap-go/.gitignore
generated
vendored
3
vendor/github.com/edsrzf/mmap-go/.gitignore
generated
vendored
@@ -6,3 +6,6 @@
|
||||
_obj
|
||||
_test
|
||||
testdata
|
||||
/.idea
|
||||
*.iml
|
||||
/notes.txt
|
||||
|
||||
16
vendor/github.com/edsrzf/mmap-go/README.md
generated
vendored
16
vendor/github.com/edsrzf/mmap-go/README.md
generated
vendored
@@ -1,12 +1,14 @@
|
||||
mmap-go
|
||||
=======
|
||||

|
||||
[](https://pkg.go.dev/github.com/edsrzf/mmap-go)
|
||||
|
||||
mmap-go is a portable mmap package for the [Go programming language](http://golang.org).
|
||||
It has been tested on Linux (386, amd64), OS X, and Windows (386). It should also
|
||||
work on other Unix-like platforms, but hasn't been tested with them. I'm interested
|
||||
to hear about the results.
|
||||
|
||||
I haven't been able to add more features without adding significant complexity,
|
||||
so mmap-go doesn't support mprotect, mincore, and maybe a few other things.
|
||||
If you're running on a Unix-like platform and need some of these features,
|
||||
I suggest Gustavo Niemeyer's [gommap](http://labix.org/gommap).
|
||||
Operating System Support
|
||||
========================
|
||||
This package is tested using GitHub Actions on Linux, macOS, and Windows. It should also work on other Unix-like platforms, but hasn't been tested with them. I'm interested to hear about the results.
|
||||
|
||||
I haven't been able to add more features without adding significant complexity, so mmap-go doesn't support `mprotect`, `mincore`, and maybe a few other things. If you're running on a Unix-like platform and need some of these features, I suggest Gustavo Niemeyer's [gommap](http://labix.org/gommap).
|
||||
|
||||
This package compiles on Plan 9, but its functions always return errors.
|
||||
|
||||
27
vendor/github.com/edsrzf/mmap-go/mmap_plan9.go
generated
vendored
Normal file
27
vendor/github.com/edsrzf/mmap-go/mmap_plan9.go
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
// Copyright 2020 Evan Shaw. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package mmap
|
||||
|
||||
import "syscall"
|
||||
|
||||
func mmap(len int, inprot, inflags, fd uintptr, off int64) ([]byte, error) {
|
||||
return nil, syscall.EPLAN9
|
||||
}
|
||||
|
||||
func (m MMap) flush() error {
|
||||
return syscall.EPLAN9
|
||||
}
|
||||
|
||||
func (m MMap) lock() error {
|
||||
return syscall.EPLAN9
|
||||
}
|
||||
|
||||
func (m MMap) unlock() error {
|
||||
return syscall.EPLAN9
|
||||
}
|
||||
|
||||
func (m MMap) unmap() error {
|
||||
return syscall.EPLAN9
|
||||
}
|
||||
23
vendor/github.com/edsrzf/mmap-go/mmap_windows.go
generated
vendored
23
vendor/github.com/edsrzf/mmap-go/mmap_windows.go
generated
vendored
@@ -22,8 +22,9 @@ import (
|
||||
// We keep this map so that we can get back the original handle from the memory address.
|
||||
|
||||
type addrinfo struct {
|
||||
file windows.Handle
|
||||
mapview windows.Handle
|
||||
file windows.Handle
|
||||
mapview windows.Handle
|
||||
writable bool
|
||||
}
|
||||
|
||||
var handleLock sync.Mutex
|
||||
@@ -32,13 +33,16 @@ var handleMap = map[uintptr]*addrinfo{}
|
||||
func mmap(len int, prot, flags, hfile uintptr, off int64) ([]byte, error) {
|
||||
flProtect := uint32(windows.PAGE_READONLY)
|
||||
dwDesiredAccess := uint32(windows.FILE_MAP_READ)
|
||||
writable := false
|
||||
switch {
|
||||
case prot© != 0:
|
||||
flProtect = windows.PAGE_WRITECOPY
|
||||
dwDesiredAccess = windows.FILE_MAP_COPY
|
||||
writable = true
|
||||
case prot&RDWR != 0:
|
||||
flProtect = windows.PAGE_READWRITE
|
||||
dwDesiredAccess = windows.FILE_MAP_WRITE
|
||||
writable = true
|
||||
}
|
||||
if prot&EXEC != 0 {
|
||||
flProtect <<= 4
|
||||
@@ -63,12 +67,14 @@ func mmap(len int, prot, flags, hfile uintptr, off int64) ([]byte, error) {
|
||||
fileOffsetLow := uint32(off & 0xFFFFFFFF)
|
||||
addr, errno := windows.MapViewOfFile(h, dwDesiredAccess, fileOffsetHigh, fileOffsetLow, uintptr(len))
|
||||
if addr == 0 {
|
||||
windows.CloseHandle(windows.Handle(h))
|
||||
return nil, os.NewSyscallError("MapViewOfFile", errno)
|
||||
}
|
||||
handleLock.Lock()
|
||||
handleMap[addr] = &addrinfo{
|
||||
file: windows.Handle(hfile),
|
||||
mapview: h,
|
||||
file: windows.Handle(hfile),
|
||||
mapview: h,
|
||||
writable: writable,
|
||||
}
|
||||
handleLock.Unlock()
|
||||
|
||||
@@ -96,8 +102,13 @@ func (m MMap) flush() error {
|
||||
return errors.New("unknown base address")
|
||||
}
|
||||
|
||||
errno = windows.FlushFileBuffers(handle.file)
|
||||
return os.NewSyscallError("FlushFileBuffers", errno)
|
||||
if handle.writable && handle.file != windows.Handle(^uintptr(0)) {
|
||||
if err := windows.FlushFileBuffers(handle.file); err != nil {
|
||||
return os.NewSyscallError("FlushFileBuffers", err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m MMap) lock() error {
|
||||
|
||||
Reference in New Issue
Block a user