OSDN Git Service

Avoid excessive allocation of std::set<> nodes in SwapSpace.
authorVladimir Marko <vmarko@google.com>
Wed, 22 Feb 2017 10:57:03 +0000 (10:57 +0000)
committerVladimir Marko <vmarko@google.com>
Wed, 22 Feb 2017 17:33:17 +0000 (17:33 +0000)
commit3e1070239a920cc94b020a621acf4daeccebb140
tree10149549582fa984d81b737ac236c6bc931fe6db
parent30e015c442c8033390c30d2f293604723c29bc75
Avoid excessive allocation of std::set<> nodes in SwapSpace.

This does not affect the overall memory usage but avoids
a lot of deallocations followed by allocation.

Measured compilation of a big app using heap track:
  bytes allocated in total (ignoring deallocations): 4.14GB -> 4.04GB
  calls to allocation functions: 21662554 -> 19545823

Test: m test-art-host-gtest
Test: Manually check that oat file for the big app remains identical.
Bug: 34053922
Change-Id: I00568422ba5510550986e29f30bace9ae6245269
compiler/utils/swap_space.cc
compiler/utils/swap_space.h