Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 704 for Deallocate (0.29 sec)

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

    	// Allocate all possible values except the reserved
    	for i := dynamicOffset; i < max; i++ {
    		if ok, _ := m.Allocate(i); !ok {
    			t.Errorf("error allocate i %v", i)
    		} else {
    			allocated++
    		}
    	}
    	// Allocate all the values of the reserved block except one
    	for i := 0; i < dynamicOffset-1; i++ {
    		if ok, _ := m.Allocate(i); !ok {
    			t.Errorf("error allocate i %v", i)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 10 08:56:31 UTC 2022
    - 13.3K bytes
    - Viewed (0)
  2. CHANGELOG/CHANGELOG-1.29.md

    - Added mock framework support for unit tests for Windows in `kubeproxy`. ([#120105](https://github.com/kubernetes/kubernetes/pull/120105), [@princepereira](https://github.com/princepereira))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 03:42:38 UTC 2024
    - 324.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/runtime/allocator_test.go

    	iterations := rand.Intn(10000) + 10
    	target := &Allocator{}
    
    	for i := 0; i < iterations; i++ {
    		bytesToAllocate := rand.Intn(maxBytes)
    		buff := target.Allocate(uint64(bytesToAllocate))
    		if cap(buff) < bytesToAllocate {
    			t.Fatalf("expected the buffer to allocate: %v bytes whereas it allocated: %v bytes", bytesToAllocate, cap(buff))
    		}
    		if len(buff) != bytesToAllocate {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 23 13:38:29 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. src/cmd/link/internal/ld/outbuf_linux.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package ld
    
    import "syscall"
    
    func (out *OutBuf) fallocate(size uint64) error {
    	return syscall.Fallocate(int(out.f.Fd()), 0, 0, int64(size))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 11 14:21:36 UTC 2020
    - 304 bytes
    - Viewed (0)
  7. pkg/kubelet/cm/devicemanager/manager_test.go

    	as.Equal(1, len(testManager.endpoints))
    
    	// Stops resourceName2 endpoint. Verifies its stopTime is set, allocate and
    	// preStartContainer calls return errors.
    	e2.client.Disconnect()
    	as.False(e2.stopTime.IsZero())
    	_, err = e2.allocate([]string{"Device1"})
    	reflect.DeepEqual(err, fmt.Errorf(errEndpointStopped, e2))
    	_, err = e2.preStartContainer([]string{"Device1"})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 65K bytes
    - Viewed (0)
  8. pkg/registry/core/service/portallocator/operation.go

    limitations under the License.
    */
    
    package portallocator
    
    // Encapsulates the semantics of a port allocation 'transaction':
    // It is better to leak ports than to double-allocate them,
    // so we allocate immediately, but defer release.
    // On commit we best-effort release the deferred releases.
    // On rollback we best-effort release any allocations we did.
    //
    // Pattern for use:
    //
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 26 17:14:05 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  9. pkg/registry/core/service/ipallocator/bitmap_test.go

    		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 {
    			t.Errorf("Unexpected error trying to allocate IP %s: %v", ip, err)
    		}
    	}
    	if f := r.Free(); f != 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 25 20:32:40 UTC 2023
    - 21.1K bytes
    - Viewed (0)
  10. pkg/registry/core/service/allocator/storage/storage.go

    		baseKey:   baseKey,
    		resource:  config.GroupResource,
    		destroyFn: func() { once.Do(d) },
    	}, nil
    }
    
    // Allocate attempts to allocate the item.
    func (e *Etcd) Allocate(offset int) (bool, error) {
    	e.lock.Lock()
    	defer e.lock.Unlock()
    
    	err := e.tryUpdate(func() error {
    		ok, err := e.alloc.Allocate(offset)
    		if err != nil {
    			return err
    		}
    		if !ok {
    			return errorUnableToAllocate
    		}
    		return nil
    	})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 6.5K bytes
    - Viewed (0)
Back to top