logic: apply some shared memory fixes
* corrections in estimating size of intermediate indexer commands * avoided clearing and refilling the indexed files list every time files get added * changed memory growth policy of InterprocessIndexingStatusManager to double allocated memory when it gets full * added potential to grow memory when adding crashed file paths
This commit is contained in:
@@ -26,17 +26,17 @@ size_t IndexerCommandCxx::getByteSize() const
|
||||
|
||||
for (auto i : m_systemHeaderSearchPaths)
|
||||
{
|
||||
size += i.str().size();
|
||||
size += sizeof(std::string) + i.str().size();
|
||||
}
|
||||
|
||||
for (auto i : m_frameworkSearchPaths)
|
||||
{
|
||||
size += i.str().size();
|
||||
size += sizeof(std::string) + i.str().size();
|
||||
}
|
||||
|
||||
for (auto i : m_compilerFlags)
|
||||
{
|
||||
size += i.size();
|
||||
size += sizeof(std::string) + i.size();
|
||||
}
|
||||
|
||||
return size;
|
||||
|
||||
@@ -64,7 +64,7 @@ IndexerCommandType IndexerCommandCxxCdb::getIndexerCommandType() const
|
||||
|
||||
size_t IndexerCommandCxxCdb::getByteSize() const
|
||||
{
|
||||
return IndexerCommandCxx::getByteSize() + sizeof(*this) + m_workingDirectory.str().size();
|
||||
return IndexerCommandCxx::getByteSize() + sizeof(std::string) + m_workingDirectory.str().size();
|
||||
}
|
||||
|
||||
FilePath IndexerCommandCxxCdb::getWorkingDirectory() const
|
||||
|
||||
@@ -30,7 +30,7 @@ IndexerCommandType IndexerCommandCxxManual::getIndexerCommandType() const
|
||||
|
||||
size_t IndexerCommandCxxManual::getByteSize() const
|
||||
{
|
||||
return IndexerCommandCxx::getByteSize() + sizeof(*this);
|
||||
return IndexerCommandCxx::getByteSize() + sizeof(std::string) + m_languageStandard.size();
|
||||
}
|
||||
|
||||
std::string IndexerCommandCxxManual::getLanguageStandard() const
|
||||
|
||||
Reference in New Issue
Block a user