OSDN Git Service

Test that relro sharing actually saves memory.
authorTorne (Richard Coles) <torne@google.com>
Fri, 2 May 2014 13:57:42 +0000 (14:57 +0100)
committerTorne (Richard Coles) <torne@google.com>
Tue, 6 May 2014 10:38:53 +0000 (11:38 +0100)
commit26052616915fe2324755687c7db73d69c521b34d
tree41cfb3c89c4ab9b94be4c31330877fc0abeeda6a
parent9b5ee4aa85cf55467eb9a749b6602f6f2ba1cfc6
Test that relro sharing actually saves memory.

Spawn 20 child processes, have them all load the library, and compare
the total PSS used in the case where we use dlopen() and the case where
we use android_dlopen_ext() with relro sharing. We assume we will save
at least 10% of the memory; in practise this example saves 40% or more
so this should be a reasonable threshold.

Bug: 14299541
Change-Id: Idccf6b8b0eb137abae2200f1ce68fb76b3cbdd75
tests/Android.mk
tests/dlext_test.cpp