Avoids unnecessary allocations during mmap executables (#1366)
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user