forked from valkey-io/valkey
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use static buffer for rdbcompression
Lazily allocate 8KiB buffer to use for compression. This buffer should be large enough for most cases. When a larger buffer is required, rdbSaveLzfStringObject falls back to the ad hoc allocation. This change goes together with the further change that introduces freeing string objects during BGSAVE. It greatly decreases the number of COW events. Otherwise compression allocations reuses the memory freed by string objects. Which leads to COW. Signed-off-by: Vadym Khoptynets <vadymkh@amazon.com>
- Loading branch information
Showing
2 changed files
with
12 additions
and
3 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