diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-04-02 18:37:16 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-04-17 11:04:08 +0200 |
commit | b88adc43bb6ffe914ca9303e3001624e36fd64fa (patch) | |
tree | 845fd9e4c746ae9b86679a0ec21640cccfeea825 /src/buildtool/storage/garbage_collector.hpp | |
parent | d9bf1d63768f1c3d660c3057d6d77c9b3b4a346d (diff) | |
download | justbuild-b88adc43bb6ffe914ca9303e3001624e36fd64fa.tar.gz |
Compactification: Split large entries.
During garbage collection split and remove from the storage every entry that is larger than a threshold.
Diffstat (limited to 'src/buildtool/storage/garbage_collector.hpp')
-rw-r--r-- | src/buildtool/storage/garbage_collector.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/buildtool/storage/garbage_collector.hpp b/src/buildtool/storage/garbage_collector.hpp index 6bca3f3c..0d80def0 100644 --- a/src/buildtool/storage/garbage_collector.hpp +++ b/src/buildtool/storage/garbage_collector.hpp @@ -15,6 +15,7 @@ #ifndef INCLUDED_SRC_BUILDTOOL_STORAGE_GARBAGE_COLLECTOR_HPP #define INCLUDED_SRC_BUILDTOOL_STORAGE_GARBAGE_COLLECTOR_HPP +#include <cstddef> #include <functional> #include <optional> #include <string> @@ -90,10 +91,12 @@ class GarbageCollector { [[nodiscard]] auto static LockFilePath() noexcept -> std::filesystem::path; - /// \brief Remove spliced objects from the youngest generation. - /// \return True if the youngest generation does not contain spliced + /// \brief Remove spliced objects from the youngest generation and split + /// objects that are larger than the threshold. + /// \param threshold Compactification threshold. + /// \return True if the youngest generation does not contain splicable /// objects afterwards. - [[nodiscard]] auto static Compactify() noexcept -> bool; + [[nodiscard]] auto static Compactify(size_t threshold) noexcept -> bool; }; #endif // INCLUDED_SRC_BUILDTOOL_STORAGE_GARBAGE_COLLECTOR_HPP |