libsnapshot: Use std::unordered_set in DmSnapCowSizeCalculator.
There is a check here if vector resize fails. In practice, this would throw bad_alloc or length_error and cause a runtime abort, so the check is dead code. To protect against bad chunk_ids we can switch to unordered_set instead. The original memory concerns for std::set are less applicable since unordered_set is bucketed. Bug: 194431534 Test: apply OTA; run vts_libsnapshot_tests Change-Id: I09c108b700d2f83acf80a9eaa5099b46aedcab89
Loading
Please register or sign in to comment