diff --git a/tests/dlext_test.cpp b/tests/dlext_test.cpp index e7274f704..e98d66ffd 100644 --- a/tests/dlext_test.cpp +++ b/tests/dlext_test.cpp @@ -600,7 +600,7 @@ TEST_F(DlExtRelroSharingTest, VerifyMemorySaving) { void GetPss(bool shared_relro, const char* lib, const char* relro_file, pid_t pid, size_t* total_pss) { android::meminfo::ProcMemInfo proc_mem(pid); - const std::vector& maps = proc_mem.Maps(); + const std::vector& maps = proc_mem.MapsWithoutUsageStats(); ASSERT_GT(maps.size(), 0UL); // Calculate total PSS of the library. @@ -612,7 +612,9 @@ void GetPss(bool shared_relro, const char* lib, const char* relro_file, pid_t pi saw_relro_file = true; } - *total_pss += vma.usage.pss; + android::meminfo::Vma update_vma(vma); + ASSERT_TRUE(proc_mem.FillInVmaStats(update_vma)); + *total_pss += update_vma.usage.pss; } }