Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 33 for stkalloc (0.15 sec)

  1. src/runtime/mem.go

    // OS-specific implementations that handle errors, while the interface boundary
    // implements cross-OS functionality, like updating runtime accounting.
    
    // sysAlloc transitions an OS-chosen region of memory from None to Ready.
    // More specifically, it obtains a large chunk of zeroed memory from the
    // operating system, typically on the order of a hundred kilobytes
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:05:10 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  2. src/runtime/debuglog.go

    				l = l1
    				break
    			}
    		}
    	}
    
    	// If that failed, allocate a new logger.
    	if l == nil {
    		// Use sysAllocOS instead of sysAlloc because we want to interfere
    		// with the runtime as little as possible, and sysAlloc updates accounting.
    		l = (*dlogger)(sysAllocOS(unsafe.Sizeof(dlogger{})))
    		if l == nil {
    			throw("failed to allocate debug log")
    		}
    		l.w.r.data = &l.w.data
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:10:48 UTC 2024
    - 18.3K bytes
    - Viewed (0)
  3. src/runtime/mfixalloc.go

    //
    // See malloc.go for overview.
    
    package runtime
    
    import (
    	"runtime/internal/sys"
    	"unsafe"
    )
    
    // fixalloc is a simple free-list allocator for fixed size objects.
    // Malloc uses a FixAlloc wrapped around sysAlloc to manage its
    // mcache and mspan objects.
    //
    // Memory returned by fixalloc.alloc is zeroed by default, but the
    // caller may take responsibility for zeroing allocations by setting
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 24 20:28:25 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  4. 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.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:47:01 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  5. test/fibo.go

    	}
    }
    
    func doBench(half, opt bool) {
    	w := tabwriter.NewWriter(os.Stdout, 0, 8, 2, ' ', tabwriter.AlignRight)
    	fmt.Fprintf(w, "wordsize = %d, half = %v, opt = %v\n", W, half, opt)
    	fmt.Fprintf(w, "n\talloc count\talloc bytes\tns/op\ttime/op\t\n")
    	for n := 1; n <= 1e6; n *= 10 {
    		res := testing.Benchmark(func(b *testing.B) { benchFibo(b, n, half, opt) })
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 08 22:22:58 UTC 2014
    - 6.3K bytes
    - Viewed (0)
  6. src/runtime/sys_openbsd2.go

    }
    func thrkill_trampoline()
    
    // mmap is used to do low-level memory allocation via mmap. Don't allow stack
    // splits, since this function (used by sysAlloc) is called in a lot of low-level
    // parts of the runtime and callers often assume it won't acquire any locks.
    //
    //go:nosplit
    func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) (unsafe.Pointer, int) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  7. pkg/registry/core/service/storage/alloc.go

    		if i > (len(service.Spec.ClusterIPs) - 1) {
    			service.Spec.ClusterIPs = append(service.Spec.ClusterIPs, "" /* just a marker */)
    		}
    
    		toAlloc[ipFamily] = service.Spec.ClusterIPs[i]
    	}
    
    	// allocate
    	allocated, err := al.allocIPs(service, toAlloc, dryRun)
    
    	// set if successful
    	if err == nil {
    		for family, ip := range allocated {
    			for i, check := range service.Spec.IPFamilies {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:05 UTC 2023
    - 37.3K bytes
    - Viewed (0)
  8. src/runtime/tracebuf.go

    			traceBufFlush(w.traceBuf, w.gen)
    		}
    		if trace.empty != nil {
    			w.traceBuf = trace.empty
    			trace.empty = w.traceBuf.link
    			unlock(&trace.lock)
    		} else {
    			unlock(&trace.lock)
    			w.traceBuf = (*traceBuf)(sysAlloc(unsafe.Sizeof(traceBuf{}), &memstats.other_sys))
    			if w.traceBuf == nil {
    				throw("trace: out of memory")
    			}
    		}
    	})
    	// Initialize the buffer.
    	ts := traceClockNow()
    	if ts <= w.traceBuf.lastTime {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:47:01 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  9. src/runtime/HACKING.md

    There are three mechanisms for allocating unmanaged memory:
    
    * sysAlloc obtains memory directly from the OS. This comes in whole
      multiples of the system page size, but it can be freed with sysFree.
    
    * persistentalloc combines multiple smaller allocations into a single
      sysAlloc to avoid fragmentation. However, there is no way to free
      persistentalloced objects (hence the name).
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  10. src/runtime/arena.go

    			hintList = &h.arenaHints
    		}
    		v, size := h.sysAlloc(userArenaChunkBytes, hintList, false)
    		if size%userArenaChunkBytes != 0 {
    			throw("sysAlloc size is not divisible by userArenaChunkBytes")
    		}
    		if size > userArenaChunkBytes {
    			// We got more than we asked for. This can happen if
    			// heapArenaSize > userArenaChunkSize, or if sysAlloc just returns
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:44:56 UTC 2024
    - 37.9K bytes
    - Viewed (0)
Back to top