Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove mmapSize check, it has wrong value on ARM64 #281

Merged
merged 1 commit into from
Sep 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions z/mmap_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package z

import (
"fmt"
"os"
"reflect"
"unsafe"
Expand All @@ -41,7 +40,7 @@ func mremap(data []byte, size int) ([]byte, error) {
const MREMAP_MAYMOVE = 0x1

header := (*reflect.SliceHeader)(unsafe.Pointer(&data))
mmapAddr, mmapSize, errno := unix.Syscall6(
mmapAddr, _, errno := unix.Syscall6(
unix.SYS_MREMAP,
header.Data,
uintptr(header.Len),
Expand All @@ -53,9 +52,6 @@ func mremap(data []byte, size int) ([]byte, error) {
if errno != 0 {
return nil, errno
}
if mmapSize != uintptr(size) {
return nil, fmt.Errorf("mremap size mismatch: requested: %d got: %d", size, mmapSize)
}

header.Data = mmapAddr
header.Cap = size
Expand Down