Review Request: Patch to reduce C++ memory consumption on x86_64 by using uint instead of size_t

David Nolden zwabel+reviewboard at gmail.com
Sun Feb 14 18:40:46 UTC 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2917/#review4150
-----------------------------------------------------------

Ship it!


Look ok

- David


On 2010-02-14 16:18:40, Alexander Dymo wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/2917/
> -----------------------------------------------------------
> 
> (Updated 2010-02-14 16:18:40)
> 
> 
> Review request for KDevelop.
> 
> 
> Summary
> -------
> 
> This patch uses uint instead of size_t in C++ parser. It also contains some changes in the kdevplatform - some parts of duchain code used uints, some parts - size_t. The patch changes that to uint.
> 
> 
> Diffs
> -----
> 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/cppduchain/declarationbuilder.h 1089739 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/cppduchain/declarationbuilder.cpp 1089739 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/cppduchain/type_visitor.cpp 1089739 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/cppduchain/typebuilder.h 1089739 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/cppduchain/typebuilder.cpp 1089739 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/parser/ast.h 1089739 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/parser/codegenerator.h 1089739 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/parser/codegenerator.cpp 1089739 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/parser/commentformatter.h 1089739 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/parser/commentformatter.cpp 1089739 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/parser/commentparser.h 1089739 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/parser/commentparser.cpp 1089739 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/parser/lexer.h 1089739 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/parser/name_compiler.cpp 1089739 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/parser/parser.h 1089739 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/parser/parser.cpp 1089739 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/parser/type_compiler.cpp 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/appendedlist.h 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/codemodel.cpp 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/definitions.cpp 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/duchain.cpp 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/duchainregister.h 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/duchainregister.cpp 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/importers.cpp 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/indexedstring.cpp 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/instantiationinformation.h 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/persistentsetmap.h 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/persistentsymboltable.cpp 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/repositories/itemrepository.h 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/repositories/stringrepository.h 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/repositories/typerepository.cpp 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/types/abstracttype.h 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/types/typeregister.h 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/types/typeregister.cpp 1089739 
>   /trunk/extragear/sdk/kdevplatform/language/duchain/uses.cpp 1089739 
> 
> Diff: http://reviewboard.kde.org/r/2917/diff
> 
> 
> Testing
> -------
> 
> Real world effect on 64bit system: parsing Ruby interpreter source code: data from memusage.sh
> 
> == Before: 909M peak memory consumption ==
> Memory usage summary: heap total: 4948870624288, heap peak: 953681795, stack peak: 95472
> 
> == After: 808M peak memory consumption ==
> Memory usage summary: heap total: 4948324604564, heap peak: 847761068, stack peak: 95440
> 
> All C++ tests still pass after this change.
> 
> 
> Thanks,
> 
> Alexander
> 
>





More information about the KDevelop-devel mailing list