-
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.
Cache RAM capacity (/proc/meminfo) readings and CAS when the cache is…
… expired (#63) * 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 * feat: add a CAS cache that stores a cached reading of meminfo to avoid hammering the file with reads * 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
1 changed file
with
96 additions
and
40 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