Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 1,371 for Allocate (0.29 sec)

  1. pkg/registry/core/service/ipallocator/bitmap_test.go

    		if !r.Has(netutils.ParseIPSloppy(ip)) {
    			t.Errorf("IP %s expected to be allocated", ip)
    		}
    	}
    	if f := r.Free(); f != dynamicOffset {
    		t.Errorf("expected %d free addresses, got %d", dynamicOffset, f)
    	}
    	// allocate all addresses on the static block
    	for i := 0; i < dynamicOffset; i++ {
    		ip := fmt.Sprintf("192.168.1.%d", i+1)
    		if err := r.Allocate(netutils.ParseIPSloppy(ip)); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 25 20:32:40 UTC 2023
    - 21.1K bytes
    - Viewed (0)
  2. pkg/registry/core/service/ipallocator/bitmap.go

    const dryRunFalse = false
    
    // Allocate attempts to reserve the provided IP. ErrNotInRange or
    // ErrAllocated will be returned if the IP is not valid for this range
    // or has already been reserved.  ErrFull will be returned if there
    // are no addresses left.
    func (r *Range) Allocate(ip net.IP) error {
    	return r.allocate(ip, dryRunFalse)
    }
    
    func (r *Range) allocate(ip net.IP, dryRun bool) error {
    	label := r.CIDR()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 25 20:32:40 UTC 2023
    - 10.8K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/runtime/allocator.go

    	},
    }
    
    // Allocator knows how to allocate memory
    // It exists to make the cost of object serialization cheaper.
    // In some cases, it allows for allocating memory only once and then reusing it.
    // This approach puts less load on GC and leads to less fragmented memory in general.
    type Allocator struct {
    	buf []byte
    }
    
    var _ MemoryAllocator = &Allocator{}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 27 03:17:50 UTC 2022
    - 2.2K bytes
    - Viewed (0)
  4. pkg/registry/core/service/storage/alloc.go

    				} else {
    					err = allocator.Allocate(parsedIP)
    				}
    			} else {
    				err = allocator.Allocate(parsedIP)
    			}
    			if err != nil {
    				el := field.ErrorList{field.Invalid(field.NewPath("spec", "clusterIPs"), service.Spec.ClusterIPs, fmt.Sprintf("failed to allocate IP %v: %v", ip, err))}
    				return allocated, errors.NewInvalid(api.Kind("Service"), service.Name, el)
    			}
    			allocated[family] = ip
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:05 UTC 2023
    - 37.3K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel.go

    }
    
    func (c *Controller) NodeIsSuitable(ctx context.Context, model Model) (bool, error) {
    	indices, err := c.allocate(ctx, model)
    	return len(indices) == len(c.requests), err
    }
    
    func (c *Controller) Allocate(ctx context.Context, model Model) ([]*resourceapi.NamedResourcesAllocationResult, error) {
    	indices, err := c.allocate(ctx, model)
    	if err != nil {
    		return nil, err
    	}
    	if len(indices) != len(c.requests) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:26:16 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/connection/RouteSelectorTest.kt

        val address = factory.newHttpsAddress()
        proxySelector.proxies.add(proxyA)
        proxySelector.proxies.add(proxyB)
        var routeSelector = newRouteSelector(address)
        dns[PROXY_A_HOST] = dns.allocate(1)
        dns[PROXY_B_HOST] = dns.allocate(1)
    
        // Mark the ProxyA route as failed.
        val selection = routeSelector.next()
        dns.assertRequests(PROXY_A_HOST)
        val route = selection.next()
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Wed Mar 06 17:33:38 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. pkg/registry/core/service/ipallocator/ipallocator_test.go

    		if !r.Has(netutils.ParseIPSloppy(ip)) {
    			t.Errorf("IP %s expected to be allocated", ip)
    		}
    	}
    	if f := r.Free(); f != dynamicOffset {
    		t.Errorf("expected %d free addresses, got %d", dynamicOffset, f)
    	}
    	// allocate all addresses on the static block
    	for i := 0; i < dynamicOffset; i++ {
    		ip := fmt.Sprintf("192.168.1.%d", i+1)
    		if err := r.Allocate(netutils.ParseIPSloppy(ip)); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jun 25 13:14:46 UTC 2023
    - 24.2K bytes
    - Viewed (0)
  10. 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)
Back to top