Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 1,371 for Allocate (0.42 sec)

  1. 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)
  2. pkg/kubelet/cm/memorymanager/memory_manager.go

    	// Allocate is called to pre-allocate memory resources during Pod admission.
    	// This must be called at some point prior to the AddContainer() call for a container, e.g. at pod admission time.
    	Allocate(pod *v1.Pod, container *v1.Container) error
    
    	// RemoveContainer is called after Kubelet decides to kill or delete a
    	// container. After this call, any memory allocated to the container is freed.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 01 00:50:45 UTC 2023
    - 17.1K bytes
    - Viewed (0)
  3. pkg/registry/core/service/allocator/bitmap.go

    			rand:   rand.New(rand.NewSource(time.Now().UnixNano())),
    			offset: offset,
    		},
    		allocated: big.NewInt(0),
    		count:     0,
    		max:       max,
    		rangeSpec: rangeSpec,
    	}
    
    	return &a
    }
    
    // Allocate attempts to reserve the provided item.
    // Returns true if it was allocated, false if it was already in use
    func (r *AllocationBitmap) Allocate(offset int) (bool, error) {
    	r.lock.Lock()
    	defer r.lock.Unlock()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 25 20:32:40 UTC 2023
    - 7.6K bytes
    - Viewed (0)
  4. pkg/kubelet/cm/devicemanager/endpoint.go

    				AllocationSize:       int32(size),
    			},
    		},
    	})
    }
    
    // allocate issues Allocate gRPC call to the device plugin.
    func (e *endpointImpl) allocate(devs []string) (*pluginapi.AllocateResponse, error) {
    	if e.isStopped() {
    		return nil, fmt.Errorf(errEndpointStopped, e)
    	}
    	return e.api.Allocate(context.Background(), &pluginapi.AllocateRequest{
    		ContainerRequests: []*pluginapi.ContainerAllocateRequest{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 02 11:05:20 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  5. pkg/kubelet/cm/cpumanager/cpu_assignment_test.go

    		},
    		{
    			"allocate 24 full cores with 8 distributed across the last 3 NUMA nodes (even though all 8 could be allocated from the first NUMA node)",
    			topoDualSocketMultiNumaPerSocketHT,
    			mustParseCPUSet(t, "2-29,31-39,42-69,71-79"),
    			48,
    			1,
    			"",
    			mustParseCPUSet(t, "10-17,20-27,31-38,50-57,60-67,71-78"),
    		},
    		{
    			"allocate 8 full cores with 2 distributed across each NUMA node",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 09 17:31:37 UTC 2023
    - 22.7K bytes
    - Viewed (0)
  6. subprojects/core/src/testFixtures/groovy/org/gradle/util/ports/ReservedPortRange.groovy

        final List<Integer> allocated = []
        int current
    
        public ReservedPortRange(int startPort, int endPort) {
            this.startPort = startPort
            this.endPort = endPort
            current = startPort + new Random().nextInt(endPort - startPort)
        }
    
        /**
         * Allocate an available port
         *
         * @return the port that was allocated
         */
        public int allocate() {
            try {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Aug 10 14:46:58 UTC 2017
    - 2.8K bytes
    - Viewed (0)
  7. pkg/controller/nodeipam/ipam/cidrset/cidr_set_test.go

    		}
    	}
    
    	// Make sure that we can allocate exactly `numAllocatable24s` elements.
    	for i := 0; i < numAllocatable24s; i++ {
    		_, err := a.AllocateNext()
    		if err != nil {
    			t.Fatalf("Expected to be able to allocate %d CIDRS, failed after %d", numAllocatable24s, i)
    		}
    	}
    
    	_, err = a.AllocateNext()
    	if err == nil {
    		t.Fatalf("Expected to be able to allocate exactly %d CIDRS, got one more", numAllocatable24s)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 11 08:53:03 UTC 2023
    - 29.5K bytes
    - Viewed (0)
  8. test/fixedbugs/issue16095.go

    	// Initialize x.
    	for i := range x {
    		x[i] = byte(i)
    	}
    
    	// Force x to be allocated on the heap.
    	sink = &x
    	sink = nil
    
    	// Go to deferreturn after the panic below.
    	defer func() {
    		recover()
    	}()
    
    	// This call collects the heap-allocated version of x (oops!)
    	runtime.GC()
    
    	// Allocate that same object again and clobber it.
    	y := new([20]byte)
    	for i := 0; i < 20; i++ {
    		y[i] = 99
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 27 16:48:48 UTC 2016
    - 1.9K bytes
    - Viewed (0)
  9. subprojects/core/src/testFixtures/groovy/org/gradle/util/ports/AbstractAvailablePortAllocator.groovy

                for (int i = 0; i < reservations.size(); i++) {
                    ReservedPortRange range = reservations.get(i)
                    int port = range.allocate()
                    if (port > 0) {
                        return port
                    }
                }
                // if we couldn't allocate a port from the existing reserved port ranges, get another range
                reservePortRange()
            }
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 05 16:58:31 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  10. src/internal/saferio/io.go

    // data but the input may be corrupt, or may be provided by an
    // untrustworthy attacker.
    package saferio
    
    import (
    	"io"
    	"unsafe"
    )
    
    // chunk is an arbitrary limit on how much memory we are willing
    // to allocate without concern.
    const chunk = 10 << 20 // 10M
    
    // ReadData reads n bytes from the input stream, but avoids allocating
    // all n bytes if n is large. This avoids crashing the program by
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 31 00:34:05 UTC 2023
    - 3.4K bytes
    - Viewed (0)
Back to top