Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for persistentalloc1 (0.62 sec)

  1. src/runtime/malloc.go

    // See issue 9174.
    //
    //go:systemstack
    func persistentalloc1(size, align uintptr, sysStat *sysMemStat) *notInHeap {
    	const (
    		maxBlock = 64 << 10 // VM reservation granularity is 64K on windows
    	)
    
    	if size == 0 {
    		throw("persistentalloc: size == 0")
    	}
    	if align != 0 {
    		if align&(align-1) != 0 {
    			throw("persistentalloc: align is not a power of 2")
    		}
    		if align > _PageSize {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  2. src/runtime/mranges.go

    	sysStat *sysMemStat
    }
    
    func (a *addrRanges) init(sysStat *sysMemStat) {
    	ranges := (*notInHeapSlice)(unsafe.Pointer(&a.ranges))
    	ranges.len = 0
    	ranges.cap = 16
    	ranges.array = (*notInHeap)(persistentalloc(unsafe.Sizeof(addrRange{})*uintptr(ranges.cap), goarch.PtrSize, sysStat))
    	a.sysStat = sysStat
    	a.totalBytes = 0
    }
    
    // findSucc returns the first index in a such that addr is
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  3. src/runtime/mspanset.go

    	stack lfstack
    }
    
    // alloc tries to grab a spanSetBlock out of the pool, and if it fails
    // persistentallocs a new one and returns it.
    func (p *spanSetBlockAlloc) alloc() *spanSetBlock {
    	if s := (*spanSetBlock)(p.stack.pop()); s != nil {
    		return s
    	}
    	return (*spanSetBlock)(persistentalloc(unsafe.Sizeof(spanSetBlock{}), cpu.CacheLineSize, &memstats.gcMiscSys))
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  4. src/runtime/mcheckmark.go

    	for _, ai := range mheap_.allArenas {
    		arena := mheap_.arenas[ai.l1()][ai.l2()]
    		bitmap := arena.checkmarks
    
    		if bitmap == nil {
    			// Allocate bitmap on first use.
    			bitmap = (*checkmarksMap)(persistentalloc(unsafe.Sizeof(*bitmap), 0, &memstats.gcMiscSys))
    			if bitmap == nil {
    				throw("out of memory allocating checkmarks bitmap")
    			}
    			arena.checkmarks = bitmap
    		} else {
    			// Otherwise clear the existing bitmap.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  5. src/runtime/mfixalloc.go

    		v := unsafe.Pointer(f.list)
    		f.list = f.list.next
    		f.inuse += f.size
    		if f.zero {
    			memclrNoHeapPointers(v, f.size)
    		}
    		return v
    	}
    	if uintptr(f.nchunk) < f.size {
    		f.chunk = uintptr(persistentalloc(uintptr(f.nalloc), 0, f.stat))
    		f.nchunk = f.nalloc
    	}
    
    	v := unsafe.Pointer(f.chunk)
    	if f.first != nil {
    		f.first(f.arg, v)
    	}
    	f.chunk = f.chunk + f.size
    	f.nchunk -= uint32(f.size)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 24 20:28:25 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  6. src/runtime/HACKING.md

    * 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).
    
    * fixalloc is a SLAB-style allocator that allocates objects of a fixed
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/typebits/typebits.go

    		}
    		// The first word of an interface is a pointer, but we don't
    		// treat it as such.
    		// 1. If it is a non-empty interface, the pointer points to an itab
    		//    which is always in persistentalloc space.
    		// 2. If it is an empty interface, the pointer points to a _type.
    		//   a. If it is a compile-time-allocated type, it points into
    		//      the read-only data section.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 01:53:41 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  8. src/runtime/export_test.go

    }
    
    func FrameStartLine(f *Frame) int {
    	return f.startLine
    }
    
    // PersistentAlloc allocates some memory that lives outside the Go heap.
    // This memory will never be freed; use sparingly.
    func PersistentAlloc(n uintptr) unsafe.Pointer {
    	return persistentalloc(n, 0, &memstats.other_sys)
    }
    
    // FPCallers works like Callers and uses frame pointer unwinding to populate
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
  9. src/runtime/cgocheck.go

    		return
    	}
    
    	// If the object is pinned, it's safe to store it in C memory. The GC
    	// ensures it will not be moved or freed.
    	if isPinned(src) {
    		return
    	}
    
    	// It's OK if writing to memory allocated by persistentalloc.
    	// Do this check last because it is more expensive and rarely true.
    	// If it is false the expense doesn't matter since we are crashing.
    	if inPersistentAlloc(uintptr(unsafe.Pointer(dst))) {
    		return
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 04:07:57 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  10. src/runtime/mfinal.go

    		// have automatically).
    		throw("queuefinalizer during GC")
    	}
    
    	lock(&finlock)
    	if finq == nil || finq.cnt == uint32(len(finq.fin)) {
    		if finc == nil {
    			finc = (*finblock)(persistentalloc(_FinBlockSize, 0, &memstats.gcMiscSys))
    			finc.alllink = allfin
    			allfin = finc
    			if finptrmask[0] == 0 {
    				// Build pointer mask for Finalizer array in block.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 01:56:56 UTC 2024
    - 19K bytes
    - Viewed (0)
Back to top