Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 474 for Allocate (0.13 sec)

  1. 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)
  2. pkg/registry/core/service/portallocator/allocator_test.go

    	if err := r.Release(released); err != nil {
    		t.Fatal(err)
    	}
    
    	err = r.Allocate(1)
    	if _, ok := err.(*ErrNotInRange); !ok {
    		t.Fatal(err)
    	}
    
    	if err := r.Allocate(10001); err != ErrAllocated {
    		t.Fatal(err)
    	}
    
    	err = r.Allocate(20000)
    	if _, ok := err.(*ErrNotInRange); !ok {
    		t.Fatal(err)
    	}
    
    	err = r.Allocate(10201)
    	if _, ok := err.(*ErrNotInRange); !ok {
    		t.Fatal(err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 08 07:15:02 UTC 2024
    - 14K bytes
    - Viewed (0)
  3. pkg/kubelet/cm/devicemanager/manager.go

    	// If we can allocate all remaining devices from the set of aligned ones, then
    	// give the plugin the chance to influence which ones to allocate from that set.
    	if needed < aligned.Len() {
    		// First allocate from the preferred devices list (if available).
    		preferred, err := m.callGetPreferredAllocationIfAvailable(podUID, contName, resource, aligned.Union(allocated), allocated, required)
    		if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 15 12:01:56 UTC 2024
    - 43K 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.
    	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)
  5. 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)
  6. pkg/kubelet/cm/cpumanager/policy_static_test.go

    			defaultCPUSet: testCase.stDefaultCPUSet,
    		}
    		pod := testCase.pod
    
    		// allocate
    		for _, container := range append(pod.Spec.InitContainers, pod.Spec.Containers...) {
    			policy.Allocate(st, pod, &container)
    		}
    		if !reflect.DeepEqual(st.defaultCPUSet, testCase.expCSetAfterAlloc) {
    			t.Errorf("StaticPolicy Allocate() error (%v). expected default cpuset %v but got %v",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 40.8K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

              .put(Buffer.class, ByteBuffer.allocate(0))
              .put(CharBuffer.class, CharBuffer.allocate(0))
              .put(ByteBuffer.class, ByteBuffer.allocate(0))
              .put(ShortBuffer.class, ShortBuffer.allocate(0))
              .put(IntBuffer.class, IntBuffer.allocate(0))
              .put(LongBuffer.class, LongBuffer.allocate(0))
              .put(FloatBuffer.class, FloatBuffer.allocate(0))
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Apr 17 16:33:44 UTC 2024
    - 20.5K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

              .put(Buffer.class, ByteBuffer.allocate(0))
              .put(CharBuffer.class, CharBuffer.allocate(0))
              .put(ByteBuffer.class, ByteBuffer.allocate(0))
              .put(ShortBuffer.class, ShortBuffer.allocate(0))
              .put(IntBuffer.class, IntBuffer.allocate(0))
              .put(LongBuffer.class, LongBuffer.allocate(0))
              .put(FloatBuffer.class, FloatBuffer.allocate(0))
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Apr 17 16:33:44 UTC 2024
    - 21K bytes
    - Viewed (0)
  9. test/fixedbugs/issue67255.go

    	for i := 10; i < 200; i++ {
    		// The objects we're allocating here are pointer-ful. Some will
    		// max out their size class, which are the ones we want.
    		// We also allocate from small to large, so that the object which
    		// maxes out its size class is the last one allocated in that class.
    		// This allocation pattern leaves the next object in the class
    		// unallocated, which we need to reproduce the bug.
    		objs = append(objs, make([]*byte, i))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 922 bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/subst.go

    }
    
    func (subst *subster) varList(in []*Var) (out []*Var, copied bool) {
    	out = in
    	for i, v := range in {
    		if w := subst.var_(v); w != v {
    			if !copied {
    				// first variable that got substituted => allocate new out slice
    				// and copy all variables
    				new := make([]*Var, len(in))
    				copy(new, out)
    				out = new
    				copied = true
    			}
    			out[i] = w
    		}
    	}
    	return
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:04:07 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top