- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 283 for fallocate (0.14 sec)
-
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
pkg/registry/core/service/allocator/bitmap.go
rand: rand.New(rand.NewSource(time.Now().UnixNano())), offset: offset, }, allocated: big.NewInt(0), count: 0, max: max, rangeSpec: rangeSpec, } return &a } // Allocate attempts to reserve the provided item. // Returns true if it was allocated, false if it was already in use func (r *AllocationBitmap) Allocate(offset int) (bool, error) { r.lock.Lock() defer r.lock.Unlock()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 25 20:32:40 UTC 2023 - 7.6K bytes - Viewed (0) -
pkg/registry/core/service/portallocator/storage/storage_test.go
t.Fatalf("unexpected error: %v", err) } // Allocate a port inside the valid port range if err := storage.Allocate(30100); err != nil { t.Fatal(err) } // Try to allocate the same port in the local bitmap // The local bitmap stores the offset of the port // offset = port - base (30100 - 30000 = 100) ok, err := backing.Allocate(100) if err != nil { t.Fatal(err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 08 07:15:02 UTC 2024 - 8.1K bytes - Viewed (0)