aboutsummaryrefslogtreecommitdiff
path: root/internal/bufpool/class.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-04-02 06:23:30 +0000
committerGravatar Runxi Yu2026-04-02 06:28:39 +0000
commita041d523de389b65b98a5373a8034041db2a8d83 (patch)
tree7b423dc735f463be616045f2c3c2095a7737aca7 /internal/bufpool/class.go
parentresearch: Add dynamic pack resources (diff)
signatureNo signature
*: Remove
Diffstat (limited to 'internal/bufpool/class.go')
-rw-r--r--internal/bufpool/class.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/internal/bufpool/class.go b/internal/bufpool/class.go
deleted file mode 100644
index 92b9742a..00000000
--- a/internal/bufpool/class.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package bufpool
-
-//nolint:gochecknoglobals
-var sizeClasses = [...]int{
- DefaultBufferCap,
- 64 << 10,
- 128 << 10,
- 256 << 10,
- 512 << 10,
- 1 << 20,
- 2 << 20,
- 4 << 20,
- maxPooledBuffer,
-}
-
-func classFor(size int) (idx, classCap int, ok bool) {
- for i, class := range sizeClasses {
- if size <= class {
- return i, class, true
- }
- }
-
- return -1, size, false
-}