Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-buffer-pool
Commits
e8a991d6
Unverified
Commit
e8a991d6
authored
Oct 04, 2018
by
Steven Allen
Committed by
GitHub
Oct 04, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2 from libp2p/kevina/fix-32-bit-overflow
Fix overflow on 32-bit platforms.
parents
1d28ab5f
2ad47e56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
pool.go
pool.go
+2
-1
No files found.
pool.go
View file @
e8a991d6
...
...
@@ -21,6 +21,7 @@
package
pool
import
(
"math"
"math/bits"
"sync"
)
...
...
@@ -29,7 +30,7 @@ import (
var
GlobalPool
=
new
(
BufferPool
)
// MaxLength is the maximum length of an element that can be added to the Pool.
const
MaxLength
=
1
<<
32
const
MaxLength
=
math
.
MaxInt
32
// BufferPool is a pool to handle cases of reusing elements of varying sizes. It
// maintains 32 internal pools, for each power of 2 in 0-32.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment