Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 171 for Allocate (0.14 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/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)
  3. 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)
  4. 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)
  5. pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel_test.go

    			}
    
    			allocation, createErr := controller.Allocate(tCtx, tc.model)
    			if createErr != nil {
    				if !tc.expectAllocateErr {
    					tCtx.Fatalf("unexpected allocate error: %v", createErr)
    				}
    				return
    			}
    			if tc.expectAllocateErr {
    				tCtx.Fatalf("did not get expected allocate error")
    			}
    
    			expectAllocation := []*resourceapi.NamedResourcesAllocationResult{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 27 09:27:01 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  6. 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)
  7. src/runtime/os_wasm.go

    //go:nosplit
    func osyield_no_g() {
    	osyield()
    }
    
    type sigset struct{}
    
    // Called to initialize a new m (including the bootstrap m).
    // Called on the parent thread (main thread in case of bootstrap), can allocate memory.
    func mpreinit(mp *m) {
    	mp.gsignal = malg(32 * 1024)
    	mp.gsignal.m = mp
    }
    
    //go:nosplit
    func usleep_no_g(usec uint32) {
    	usleep(usec)
    }
    
    //go:nosplit
    func sigsave(p *sigset) {
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/request/list_work_estimator.go

    	numStored, err := e.countGetterFn(key(requestInfo))
    	switch {
    	case err == ObjectCountStaleErr:
    		// object count going stale is indicative of degradation, so we should
    		// be conservative here and allocate maximum seats to this list request.
    		// NOTE: if a CRD is removed, its count will go stale first and then the
    		// pruner will eventually remove the CRD from the cache.
    		return WorkEstimate{InitialSeats: maxSeats}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 11:56:42 UTC 2024
    - 7K bytes
    - Viewed (0)
  9. src/runtime/mcentral.go

    		traceRelease(trace)
    	}
    
    	// If we sweep spanBudget spans without finding any free
    	// space, just allocate a fresh span. This limits the amount
    	// of time we can spend trying to find free space and
    	// amortizes the cost of small object sweeping over the
    	// benefit of having a full free span to allocate from. By
    	// setting this to 100, we limit the space overhead to 1%.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/FakeDns.kt

      }
    
      fun assertRequests(vararg expectedHosts: String?) {
        assertThat(requestedHosts).containsExactly(*expectedHosts)
        requestedHosts.clear()
      }
    
      /** Allocates and returns `count` fake IPv4 addresses like [255.0.0.100, 255.0.0.101].  */
      fun allocate(count: Int): List<InetAddress> {
        val from = nextAddress
        nextAddress += count
        return (from until nextAddress)
          .map {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.6K bytes
    - Viewed (0)
Back to top