mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
fix: blocklists allocate more memory than they need (#4953)
This commit is contained in:
@@ -390,7 +390,7 @@ void Blocklist::ensureLoaded() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto range = address_range_t{};
|
auto range = address_range_t{};
|
||||||
rules_.reserve(file_info->size - std::size(BinContentsPrefix) / sizeof(address_range_t));
|
rules_.reserve((file_info->size - std::size(BinContentsPrefix)) / sizeof(address_range_t));
|
||||||
while (in.read(reinterpret_cast<char*>(&range), sizeof(range)))
|
while (in.read(reinterpret_cast<char*>(&range), sizeof(range)))
|
||||||
{
|
{
|
||||||
rules_.emplace_back(range);
|
rules_.emplace_back(range);
|
||||||
|
|||||||
Reference in New Issue
Block a user