Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 314 for fallocate (0.11 sec)

  1. src/cmd/link/internal/ld/fallocate_test.go

    	}
    	defer out.Close()
    
    	// Try fallocate first.
    	for {
    		err = out.fallocate(1 << 10)
    		if errors.Is(err, errors.ErrUnsupported) || err == errNoFallocate { // The underlying file system may not support fallocate
    			t.Skip("fallocate is not supported")
    		}
    		if err == syscall.EINTR {
    			continue // try again
    		}
    		if err != nil {
    			t.Fatalf("fallocate failed: %v", err)
    		}
    		break
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 05 14:17:36 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  2. src/cmd/link/internal/ld/outbuf_mmap.go

    func (out *OutBuf) Mmap(filesize uint64) (err error) {
    	oldlen := len(out.buf)
    	if oldlen != 0 {
    		out.munmap()
    	}
    
    	for {
    		if err = out.fallocate(filesize); err != syscall.EINTR {
    			break
    		}
    	}
    	if err != nil {
    		// Some file systems do not support fallocate. We ignore that error as linking
    		// can still take place, but you might SIGBUS when you write to the mmapped
    		// area.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 11:20:31 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  3. src/cmd/link/internal/ld/outbuf_nofallocate.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build !darwin && !(freebsd && go1.21) && !linux
    
    package ld
    
    func (out *OutBuf) fallocate(size uint64) error {
    	return errNoFallocate
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 27 19:14:57 UTC 2023
    - 301 bytes
    - Viewed (0)
  4. src/cmd/link/internal/ld/outbuf_freebsd.go

    // license that can be found in the LICENSE file.
    
    //go:build freebsd && go1.21
    
    package ld
    
    import (
    	"internal/syscall/unix"
    	"syscall"
    )
    
    func (out *OutBuf) fallocate(size uint64) error {
    	err := unix.PosixFallocate(int(out.f.Fd()), 0, int64(size))
    	// ZFS on FreeBSD does not support posix_fallocate and returns EINVAL in that case.
    	if err == syscall.EINVAL {
    		return errNoFallocate
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 05 14:17:36 UTC 2023
    - 515 bytes
    - Viewed (0)
  5. src/cmd/link/internal/ld/outbuf_darwin.go

    func (out *OutBuf) fallocate(size uint64) error {
    	stat, err := out.f.Stat()
    	if err != nil {
    		return err
    	}
    	// F_PEOFPOSMODE allocates from the end of the file, so we want the size difference.
    	// Apparently, it uses the end of the allocation, instead of the logical end of the
    	// file.
    	cursize := uint64(stat.Sys().(*syscall.Stat_t).Blocks * 512) // allocated size
    	if size <= cursize {
    		return nil
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 13 15:50:02 UTC 2022
    - 1.3K bytes
    - Viewed (0)
  6. src/cmd/link/internal/ld/outbuf.go

    // license that can be found in the LICENSE file.
    
    package ld
    
    import (
    	"cmd/internal/sys"
    	"cmd/link/internal/loader"
    	"encoding/binary"
    	"errors"
    	"log"
    	"os"
    )
    
    // If fallocate is not supported on this platform, return this error. The error
    // is ignored where needed, and OutBuf writes to heap memory.
    var errNoFallocate = errors.New("operation not supported")
    
    const outbufMode = 0775
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 17 19:51:29 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  7. pkg/registry/core/service/portallocator/operation.go

    		return nil
    	}
    
    	return errors
    }
    
    // Allocates a port, and record it for future rollback
    func (op *PortAllocationOperation) Allocate(port int) error {
    	if op.dryRun {
    		if op.pa.Has(port) {
    			return ErrAllocated
    		}
    		for _, a := range op.allocated {
    			if port == a {
    				return ErrAllocated
    			}
    		}
    		op.allocated = append(op.allocated, port)
    		return nil
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 26 17:14:05 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  8. subprojects/core/src/testFixtures/groovy/org/gradle/util/ports/AbstractAvailablePortAllocator.groovy

                for (int i = 0; i < reservations.size(); i++) {
                    ReservedPortRange range = reservations.get(i)
                    if (range.allocated.contains(port)) {
                        range.deallocate(port)
                        if (reservations.size() > 1 && range.allocated.isEmpty()) {
                            releaseRange(range)
                        }
                    }
                }
            } finally {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 05 16:58:31 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  9. src/runtime/traceregion.go

    		}
    
    		// Add the existing block to the full list.
    		block.next = a.full
    		a.full = block
    	}
    
    	// Allocate a new block.
    	block = (*traceRegionAllocBlock)(sysAlloc(unsafe.Sizeof(traceRegionAllocBlock{}), &memstats.other_sys))
    	if block == nil {
    		throw("traceRegion: out of memory")
    	}
    
    	// Allocate space for our current request, so we always make
    	// progress.
    	block.off.Store(n)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:47:01 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  10. pkg/registry/core/service/portallocator/allocator.go

    		// include valid port range in error
    		validPorts := r.portRange.String()
    		return &ErrNotInRange{validPorts}
    	}
    
    	allocated, err := r.alloc.Allocate(offset)
    	if err != nil {
    		// update metrics
    		r.metrics.incrementAllocationErrors("static")
    		return err
    	}
    	if !allocated {
    		// update metrics
    		r.metrics.incrementAllocationErrors("static")
    		return ErrAllocated
    	}
    
    	// update metrics
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 08 07:15:02 UTC 2024
    - 7.4K bytes
    - Viewed (0)
Back to top