-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid extra allocation using buffer pools
Inserting directly a slice into a sync.Pool object caused the allocation for an extra object every Put call. Avoid it using unsafe.Pointer to the underlying array. Signed-off-by: Frediano Ziglio <fziglio@cyral.com>
- Loading branch information
Frediano Ziglio
committed
Aug 9, 2022
1 parent
a209843
commit e580b4e
Showing
1 changed file
with
13 additions
and
2 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