Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions rlimit/rlimit.go → rlimit/rlimit_linux.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build linux

// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

Expand Down
17 changes: 17 additions & 0 deletions rlimit/rlimit_other.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//go:build !linux

// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package rlimit // import "go.opentelemetry.io/ebpf-profiler/rlimit"

import (
"fmt"
"runtime"
)

// MaximizeMemlock is the stub implementation, allowing to compile the rlimit
// package on non-linux systems, always failing at runtime with an error if used.
func MaximizeMemlock() (func(), error) {
return nil, fmt.Errorf("unsupported os %s", runtime.GOOS)
}