Revert "Revert "chore: Shrink allocator pool range""

This reverts commit 8f61b0e180.
This commit is contained in:
H1JK
2023-12-01 23:06:29 +08:00
parent d773d335a2
commit 7efd692bbc
2 changed files with 32 additions and 57 deletions

View File

@@ -13,8 +13,8 @@ func TestAllocGet(t *testing.T) {
assert.Equal(t, 1, len(alloc.Get(1)))
assert.Equal(t, 2, len(alloc.Get(2)))
assert.Equal(t, 3, len(alloc.Get(3)))
assert.Equal(t, 4, cap(alloc.Get(3)))
assert.Equal(t, 4, cap(alloc.Get(4)))
assert.Equal(t, 64, cap(alloc.Get(3)))
assert.Equal(t, 64, cap(alloc.Get(4)))
assert.Equal(t, 1023, len(alloc.Get(1023)))
assert.Equal(t, 1024, cap(alloc.Get(1023)))
assert.Equal(t, 1024, len(alloc.Get(1024)))