Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 423 for Allocate (0.11 sec)

  1. 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)
  2. 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)
  3. test/fixedbugs/issue59411.go

    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"math"
    	"reflect"
    )
    
    func main() {
    	for i := 0; i < 100; i++ {
    		f()
    		g()
    	}
    }
    
    func f() {
    	// Allocate map.
    	m := map[float64]int{}
    	// Fill to just before a growth trigger.
    	const N = 13 << 4 // 6.5 * 2 * 2^k
    	for i := 0; i < N; i++ {
    		m[math.NaN()] = i
    	}
    	// Trigger growth.
    	m[math.NaN()] = N
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Apr 08 05:25:04 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/io/CharSequenceReaderTest.java

        CharBuffer buf2 = CharBuffer.allocate(expected.length());
        assertEquals(expected.length() == 0 ? -1 : expected.length(), reader.read(buf2));
        Java8Compatibility.flip(buf2);
        assertEquals(expected, buf2.toString());
        assertFullyRead(reader);
    
        // read in chunks to fixed CharBuffer
        reader = new CharSequenceReader(charSequence);
        buf2 = CharBuffer.allocate(5);
        builder = new StringBuilder();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  5. pkg/registry/core/service/portallocator/metrics.go

    type metricsRecorderInterface interface {
    	setAllocated(allocated int)
    	setAvailable(available int)
    	incrementAllocations(scope string)
    	incrementAllocationErrors(scope string)
    }
    
    // metricsRecorder implements metricsRecorderInterface.
    type metricsRecorder struct{}
    
    func (m *metricsRecorder) setAllocated(allocated int) {
    	nodePortAllocated.Set(float64(allocated))
    }
    
    func (m *metricsRecorder) setAvailable(available int) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jan 26 06:44:16 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  6. src/runtime/cgo/gcc_s390x.S

     * callee-save, so they must be saved explicitly.
     */
    .globl crosscall_s390x
    crosscall_s390x:
    	/* save r6-r15 in the register save area of the calling function */
    	stmg    %r6, %r15, 48(%r15)
    
    	/* allocate 64 bytes of stack space to save f8-f15 */
    	lay     %r15, -64(%r15)
    
    	/* save callee-saved floating point registers */
    	std     %f8, 0(%r15)
    	std     %f9, 8(%r15)
    	std     %f10, 16(%r15)
    	std     %f11, 24(%r15)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 05 16:41:48 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  7. pkg/kubelet/cm/devicemanager/types.go

    	// Allocate configures and assigns devices to a container in a pod. From
    	// the requested device resources, Allocate will communicate with the
    	// owning device plugin to allow setup procedures to take place, and for
    	// the device plugin to provide runtime settings to use the device
    	// (environment variables, mount points and device files).
    	Allocate(pod *v1.Pod, container *v1.Container) error
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 27 13:02:15 UTC 2023
    - 5K bytes
    - Viewed (0)
  8. pkg/kubelet/cm/memorymanager/fake_memory_manager.go

    	klog.InfoS("Start()")
    	return nil
    }
    
    func (m *fakeManager) Policy() Policy {
    	klog.InfoS("Policy()")
    	return NewPolicyNone()
    }
    
    func (m *fakeManager) Allocate(pod *v1.Pod, container *v1.Container) error {
    	klog.InfoS("Allocate", "pod", klog.KObj(pod), "containerName", container.Name)
    	return nil
    }
    
    func (m *fakeManager) AddContainer(pod *v1.Pod, container *v1.Container, containerID string) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 27 13:02:15 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  9. pkg/kubelet/cm/cpumanager/policy.go

    	"k8s.io/utils/cpuset"
    )
    
    // Policy implements logic for pod container to CPU assignment.
    type Policy interface {
    	Name() string
    	Start(s state.State) error
    	// Allocate call is idempotent
    	Allocate(s state.State, pod *v1.Pod, container *v1.Container) error
    	// RemoveContainer call is idempotent
    	RemoveContainer(s state.State, podUID string, containerName string) error
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 03 16:26:09 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  10. src/runtime/textflag.h

    #define WRAPPER 32
    // This function uses its incoming context register.
    #define NEEDCTXT 64
    // Allocate a word of thread local storage and store the offset from the
    // thread local base to the thread local storage in this variable.
    #define TLSBSS	256
    // Do not insert instructions to allocate a stack frame for this function.
    // Only valid on functions that declare a frame size of 0.
    #define NOFRAME 512
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 01 17:28:41 UTC 2023
    - 1.5K bytes
    - Viewed (0)
Back to top