Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for fixalloc (0.18 sec)

  1. 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)
  2. src/runtime/internal/sys/nih.go

    // to these types must always fail the `runtime.inheap` check. The type may be used
    // for global variables, or for objects in unmanaged memory (e.g., allocated with
    // `sysAlloc`, `persistentalloc`, r`fixalloc`, or from a manually-managed span).
    //
    // Specifically:
    //
    // 1. `new(T)`, `make([]T)`, `append([]T, ...)` and implicit heap
    // allocation of T are disallowed. (Though implicit allocations are
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 18:24:50 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  3. src/runtime/HACKING.md

      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
      size. fixalloced objects can be freed, but this memory can only be
      reused by the same fixalloc pool, so it can only be reused for
      objects of the same type.
    
    In general, types that are allocated using any of these should be
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  4. src/runtime/mheap.go

    	}
    
    	spanalloc              fixalloc // allocator for span*
    	cachealloc             fixalloc // allocator for mcache*
    	specialfinalizeralloc  fixalloc // allocator for specialfinalizer*
    	specialprofilealloc    fixalloc // allocator for specialprofile*
    	specialReachableAlloc  fixalloc // allocator for specialReachable
    	specialPinCounterAlloc fixalloc // allocator for specialPinCounter
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 78K bytes
    - Viewed (0)
  5. src/runtime/malloc.go

    	// maxAlloc is the maximum size of an allocation. On 64-bit,
    	// it's theoretically possible to allocate 1<<heapAddrBits bytes. On
    	// 32-bit, however, this is one less than 1<<32 because the
    	// number of bytes in the address space doesn't actually fit
    	// in a uintptr.
    	maxAlloc = (1 << heapAddrBits) - (1-_64bit)*1
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  6. src/runtime/slice.go

    		capmem = roundupsize(uintptr(newcap), noscan)
    		overflow = uintptr(newcap) > maxAlloc
    		newcap = int(capmem)
    	case et.Size_ == goarch.PtrSize:
    		lenmem = uintptr(oldLen) * goarch.PtrSize
    		newlenmem = uintptr(newLen) * goarch.PtrSize
    		capmem = roundupsize(uintptr(newcap)*goarch.PtrSize, noscan)
    		overflow = uintptr(newcap) > maxAlloc/goarch.PtrSize
    		newcap = int(capmem / goarch.PtrSize)
    	case isPowerOfTwo(et.Size_):
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  7. src/runtime/string.go

    	*(*slice)(unsafe.Pointer(&b)) = slice{p, size, int(cap)}
    	return
    }
    
    // rawruneslice allocates a new rune slice. The rune slice is not zeroed.
    func rawruneslice(size int) (b []rune) {
    	if uintptr(size) > maxAlloc/4 {
    		throw("out of memory")
    	}
    	mem := roundupsize(uintptr(size)*4, true)
    	p := mallocgc(mem, nil, false)
    	if mem != uintptr(size)*4 {
    		memclrNoHeapPointers(add(p, uintptr(size)*4), mem-uintptr(size)*4)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset_test.go

    	return alloc
    }
    
    func TestFairAlloc(t *testing.T) {
    	if e, a := []float64{0, 0}, fairAlloc([]float64{0, 0}, 42); !reflect.DeepEqual(e, a) {
    		t.Errorf("Expected %#+v, got #%+v", e, a)
    	}
    	if e, a := []float64{42, 0}, fairAlloc([]float64{47, 0}, 42); !reflect.DeepEqual(e, a) {
    		t.Errorf("Expected %#+v, got #%+v", e, a)
    	}
    	if e, a := []float64{1, 41}, fairAlloc([]float64{1, 47}, 42); !reflect.DeepEqual(e, a) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 26 12:55:23 UTC 2023
    - 58.4K bytes
    - Viewed (0)
  9. src/runtime/cgocheck.go

    	// If we are running on the system stack then dst might be an
    	// address on the stack, which is OK.
    	gp := getg()
    	if gp == gp.m.g0 || gp == gp.m.gsignal {
    		return
    	}
    
    	// Allocating memory can write to various mfixalloc structs
    	// that look like they are non-Go memory.
    	if gp.m.mallocing != 0 {
    		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.
    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. tensorflow/compiler/mlir/tensorflow/analysis/side_effect_analysis.cc

        kFree = 1,
        kRead = 2,
        kWrite = 3
      };
    
     public:
      bool IsAlloc() const { return effects_.test(kAlloc); }
      bool IsFree() const { return effects_.test(kFree); }
      bool IsRead() const { return effects_.test(kRead); }
      bool IsWrite() const { return effects_.test(kWrite); }
      bool IsAllocOnly() const { return IsAlloc() && effects_.count() == 1; }
      bool IsReadOnly() const { return IsRead() && effects_.count() == 1; }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 41.2K bytes
    - Viewed (0)
Back to top