github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/link/internal/ld/outbuf_mmap.go (about)

     1  // Copyright 2019 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  //go:build unix
     6  
     7  package ld
     8  
     9  // Mmap maps the output file with the given size. It unmaps the old mapping
    10  // if it is already mapped. It also flushes any in-heap data to the new
    11  // mapping.
    12  func (out *OutBuf) Mmap(filesize uint64) (err error)