// Copyright 2025 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build linux

package runtime

import (
	
	
	
)

var prSetVMAUnsupported atomic.Bool

// setVMAName calls prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, start, len, name)
func setVMAName( unsafe.Pointer,  uintptr,  string) {
	if debug.decoratemappings == 0 || prSetVMAUnsupported.Load() {
		return
	}

	var  [80]byte
	 := copy([:], " Go: ")
	copy([:79], ) // leave final byte zero

	, ,  := syscall.Syscall6(syscall.SYS_PRCTL, syscall.PR_SET_VMA, syscall.PR_SET_VMA_ANON_NAME, uintptr(), , uintptr(unsafe.Pointer(&[0])), 0)
	if  == _EINVAL {
		prSetVMAUnsupported.Store(true)
	}
	// ignore other errors
}