Source file src/runtime/pprof/defs_darwin.go

     1  // Copyright 2023 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // This file is used as input to cgo --godefs (GOOS=arm64 or amd64) to
     6  // generate the types used in viminfo_darwin_{arm64,amd64}.go which are
     7  // hand edited as appropriate, primarily to avoid exporting the types.
     8  
     9  //go:build ignore
    10  
    11  package pprof
    12  
    13  /*
    14  #include <sys/param.h>
    15  #include <mach/vm_prot.h>
    16  #include <mach/vm_region.h>
    17  */
    18  import "C"
    19  
    20  type machVMRegionBasicInfoData C.vm_region_basic_info_data_64_t
    21  
    22  const (
    23  	_VM_PROT_READ    = C.VM_PROT_READ
    24  	_VM_PROT_WRITE   = C.VM_PROT_WRITE
    25  	_VM_PROT_EXECUTE = C.VM_PROT_EXECUTE
    26  
    27  	_MACH_SEND_INVALID_DEST = C.MACH_SEND_INVALID_DEST
    28  
    29  	_MAXPATHLEN = C.MAXPATHLEN
    30  )
    31  

View as plain text