Commit Graph

11 Commits

Author SHA1 Message Date
Mikhail Mazurskiy 60c70a4361
mem: implement `ReadAll()` for more efficient `io.Reader` consumption (#7653) 2024-11-11 16:02:57 -08:00
Paul Chesnais f8e5d8f704
mem: use slice capacity instead of length, to determine whether to pool buffers or directly allocate them (#7702)
* Address #7631 by correctly pooling large-capacity buffers

As the issue states, `mem.NewBuffer` would not pool buffers with a length below
the pooling threshold but whose capacity is actually larger than the pooling
threshold. This can lead to buffers being leaked.

---------

Co-authored-by: Purnesh Dixit <purneshdixit@google.com>
Co-authored-by: Easwar Swaminathan <easwars@google.com>
2024-10-24 22:44:00 +05:30
Nathan Baulch 3b626a7b52
*: fix more typos (#7619) 2024-09-16 10:58:27 -07:00
Purnesh Dixit 04e78b0faf
.*: fix lint issues of not having comments for exported funcs and vars along with any remaining issues and enable remaining disabled rules (#7575)
* .*: fix lint issues of not having comments for exported funcs and vars along with any remaining issues and enable remaining disabled rules
2024-09-16 09:09:49 +05:30
Mikhail Mazurskiy 7fb7ac747b
mem: replace flate.Reader reference (#7595) 2024-09-11 10:14:38 -07:00
Codey Oxley 093e099925
grpc: fix regression by freeing request bufferslice after processing unary (#7571) 2024-08-30 11:14:41 -07:00
Arvind Bright 8320224ff0
.*: revive from unused_parameters (#7577) 2024-08-30 10:41:30 -07:00
Paul Chesnais 9ab8b62505
Implement new Codec that uses `mem.BufferSlice` instead of `[]byte` (#7356) 2024-08-21 14:11:39 -07:00
Nathan Baulch c8951abc16
*: fix minor typos (#7487)
* Fix typos

* Fix reflecton tests
2024-08-14 22:43:01 +05:30
CharlesFeng c8716e591a
mem: fix comment typo (#7482) 2024-08-06 08:53:14 -07:00
Paul Chesnais 887d908264
mem: introduce `mem` package to facilitate memory reuse (#7432) 2024-08-01 14:14:30 -07:00