$54 GRAYBYTE WORDPRESS FILE MANAGER $40

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/usr/lib/golang/src/internal/fuzz/

HOME
Current File : /usr/lib/golang/src/internal/fuzz//queue.go
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package fuzz

// queue holds a growable sequence of inputs for fuzzing and minimization.
//
// For now, this is a simple ring buffer
// (https://en.wikipedia.org/wiki/Circular_buffer).
//
// TODO(golang.org/issue/46224): use a prioritization algorithm based on input
// size, previous duration, coverage, and any other metrics that seem useful.
type queue struct {
	// elems holds a ring buffer.
	// The queue is empty when begin = end.
	// The queue is full (until grow is called) when end = begin + N - 1 (mod N)
	// where N = cap(elems).
	elems     []any
	head, len int
}

func (q *queue) cap() int {
	return len(q.elems)
}

func (q *queue) grow() {
	oldCap := q.cap()
	newCap := oldCap * 2
	if newCap == 0 {
		newCap = 8
	}
	newElems := make([]any, newCap)
	oldLen := q.len
	for i := 0; i < oldLen; i++ {
		newElems[i] = q.elems[(q.head+i)%oldCap]
	}
	q.elems = newElems
	q.head = 0
}

func (q *queue) enqueue(e any) {
	if q.len+1 > q.cap() {
		q.grow()
	}
	i := (q.head + q.len) % q.cap()
	q.elems[i] = e
	q.len++
}

func (q *queue) dequeue() (any, bool) {
	if q.len == 0 {
		return nil, false
	}
	e := q.elems[q.head]
	q.elems[q.head] = nil
	q.head = (q.head + 1) % q.cap()
	q.len--
	return e, true
}

func (q *queue) peek() (any, bool) {
	if q.len == 0 {
		return nil, false
	}
	return q.elems[q.head], true
}

func (q *queue) clear() {
	*q = queue{}
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
16 Dec 2025 9.30 PM
root / root
0755
counters_supported.go
0.715 KB
4 Dec 2025 6.06 PM
root / root
0644
counters_unsupported.go
1.143 KB
4 Dec 2025 6.06 PM
root / root
0644
coverage.go
2.66 KB
4 Dec 2025 6.06 PM
root / root
0644
encoding.go
10.985 KB
4 Dec 2025 6.06 PM
root / root
0644
fuzz.go
34.071 KB
4 Dec 2025 6.06 PM
root / root
0644
mem.go
4.489 KB
4 Dec 2025 6.06 PM
root / root
0644
minimize.go
2.26 KB
4 Dec 2025 6.06 PM
root / root
0644
mutator.go
6.631 KB
4 Dec 2025 6.06 PM
root / root
0644
mutators_byteslice.go
7.748 KB
4 Dec 2025 6.06 PM
root / root
0644
pcg.go
3.199 KB
4 Dec 2025 6.06 PM
root / root
0644
queue.go
1.484 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_posix.go
4.094 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_unimplemented.go
0.924 KB
4 Dec 2025 6.06 PM
root / root
0644
sys_windows.go
4.471 KB
4 Dec 2025 6.06 PM
root / root
0644
trace.go
1.473 KB
4 Dec 2025 6.06 PM
root / root
0644
worker.go
37.735 KB
4 Dec 2025 6.06 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF