rebase: update kubernetes to v1.25.0

update kubernetes to latest v1.25.0
release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2022-08-24 07:54:25 +05:30
committed by mergify[bot]
parent f47839d73d
commit e3bf375035
645 changed files with 42507 additions and 9219 deletions

View File

@ -24,12 +24,14 @@ import (
// by caching created but unused items for later reuse, relieving pressure on the garbage collector.
//
// Usage:
// memoryAllocator := runtime.AllocatorPool.Get().(*runtime.Allocator)
// defer runtime.AllocatorPool.Put(memoryAllocator)
//
// memoryAllocator := runtime.AllocatorPool.Get().(*runtime.Allocator)
// defer runtime.AllocatorPool.Put(memoryAllocator)
//
// A note for future:
// consider introducing multiple pools for storing buffers of different sizes
// perhaps this could allow us to be more efficient.
//
// consider introducing multiple pools for storing buffers of different sizes
// perhaps this could allow us to be more efficient.
var AllocatorPool = sync.Pool{
New: func() interface{} {
return &Allocator{}
@ -58,7 +60,7 @@ func (a *Allocator) Allocate(n uint64) []byte {
}
// grow the buffer
size := uint64(2*cap(a.buf)) + n
a.buf = make([]byte, size, size)
a.buf = make([]byte, size)
a.buf = a.buf[:n]
return a.buf
}
@ -70,5 +72,5 @@ type SimpleAllocator struct{}
var _ MemoryAllocator = &SimpleAllocator{}
func (sa *SimpleAllocator) Allocate(n uint64) []byte {
return make([]byte, n, n)
return make([]byte, n)
}