rocksdb/memory
Peter Dillinger c368c6afe8 Minor compression refactoring (#13539)
Summary:
* Mostly, remove `sample_for_compression` from CompressionInfo because it's not used by the core function it serves, `CompressData()`. Confusing (and inefficient), especially in db_bench where it appears to use `FLAGS_sample_for_compression` in places where it is actually ignored.
* Various clarifying comments, clean-ups, and tiny optimizations
* Prepare some structures like `CompressionDict` for more usage
* Some TODOs and FIXMEs about some things I've noticed are amiss, confusing, or excessive
* A notable optimization opportunity that might become a "pay as you go" improvement for the potential indirection costs of customizable compression: use C++23's resize_and_overwrite() in compress functions to avoid zeroing the string buffer contents before populating it.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/13539

Test Plan: existing tests / CI

Reviewed By: hx235

Differential Revision: D73451273

Pulled By: pdillinger

fbshipit-source-id: 0373627466d695043d21146ce34d52f189ae9432
2025-04-22 13:02:36 -07:00
..
allocator.h Run clang format against files under example/, memory/ and memtable/ folders (#10893) 2022-10-28 13:16:50 -07:00
arena.cc Fix use of make_unique in Arena::AllocateNewBlock (#11012) 2022-12-01 13:18:40 -08:00
arena.h Replace ScopedArenaIterator with ScopedArenaPtr<InternalIterator> (#12470) 2024-03-22 13:40:42 -07:00
arena_test.cc Fix ArenaTest.UnmappedAllocation in some cases (#12378) 2024-02-26 16:08:21 -08:00
concurrent_arena.cc Run clang format against files under example/, memory/ and memtable/ folders (#10893) 2022-10-28 13:16:50 -07:00
concurrent_arena.h Run clang format against files under example/, memory/ and memtable/ folders (#10893) 2022-10-28 13:16:50 -07:00
jemalloc_nodump_allocator.cc Prefer static_cast in place of most reinterpret_cast (#12308) 2024-02-07 10:44:11 -08:00
jemalloc_nodump_allocator.h cache_bench enhancements for jemalloc etc. (#11758) 2023-08-24 19:14:38 -07:00
memkind_kmem_allocator.cc Make MemoryAllocator into a Customizable class (#8980) 2021-12-17 04:20:47 -08:00
memkind_kmem_allocator.h Fix compilation error when building static_lib (#9377) 2022-01-12 09:04:01 -08:00
memory_allocator.cc Set optimize_filters_for_memory by default (#12377) 2024-04-30 08:33:31 -07:00
memory_allocator_impl.h Minor compression refactoring (#13539) 2025-04-22 13:02:36 -07:00
memory_allocator_test.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
memory_usage.h Meta-internal folly integration with F14FastMap (#9546) 2022-04-13 07:34:01 -07:00