Merge "Add a helpful error message if GetUnreachableMemory fails"

This commit is contained in:
Colin Cross 2017-06-15 23:10:14 +00:00 committed by Gerrit Code Review
commit 72ca50359e

View file

@ -502,7 +502,10 @@ std::string UnreachableMemoryInfo::ToString(bool log_contents) const {
std::string GetUnreachableMemoryString(bool log_contents, size_t limit) { std::string GetUnreachableMemoryString(bool log_contents, size_t limit) {
UnreachableMemoryInfo info; UnreachableMemoryInfo info;
if (!GetUnreachableMemory(info, limit)) { if (!GetUnreachableMemory(info, limit)) {
return "Failed to get unreachable memory\n"; return "Failed to get unreachable memory\n"
"If you are trying to get unreachable memory from a system app\n"
"(like com.android.systemui), disable selinux first using\n"
"setenforce 0\n";
} }
return info.ToString(log_contents); return info.ToString(log_contents);