Avoids unnecessary allocations during mmap executables (#1366)

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2023-04-16 22:03:35 -07:00
committed by GitHub
parent 00d9d885ff
commit d9e5d6b0d3
10 changed files with 65 additions and 93 deletions

View File

@@ -4,7 +4,6 @@ package platform
import (
"fmt"
"io"
"runtime"
)
@@ -14,10 +13,14 @@ func munmapCodeSegment(code []byte) error {
panic(errUnsupported)
}
func mmapCodeSegmentAMD64(code io.Reader, size int) ([]byte, error) {
func mmapCodeSegmentAMD64(size int) ([]byte, error) {
panic(errUnsupported)
}
func mmapCodeSegmentARM64(code io.Reader, size int) ([]byte, error) {
func mmapCodeSegmentARM64(size int) ([]byte, error) {
panic(errUnsupported)
}
func MprotectRX(b []byte) (err error) {
panic(errUnsupported)
}