Merge pull request #2 from giuseppeM99/patch-1

Fix bad_alloc in get_memory_stats
This commit is contained in:
Andrea Cavalli 2020-12-13 15:10:03 +01:00 committed by GitHub
commit ec5614fd43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -154,7 +154,8 @@ void MemoryManager::get_memory_stats(bool full, Promise<MemoryStats> promise) co
output.push_back("}}");
string s = accumulate(output.begin(), output.end(), s);
string s;
s = accumulate(output.begin(), output.end(), s);
auto value = MemoryStats(s);
promise.set_value(std::move(value));