-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use cap() instead of len() to compute the spooling threshold (#62)
* feat: use cap() instead of len() to compute the spooling threshold * feat: if the buffer is above the s.maxInMemorySize, don't return it in the pool but just discard it * fix: compute the len of the buffer AND the cap when deciding to spool * fix: TestThresholdCrossing as a buffer grow is expressed in a power of 2 and the buffer.cap() check when writing was making the test fail * feat: also discard the buffer pointer if it's cap exceeded memory limit when closing
- Loading branch information
Showing
2 changed files
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters