Merge "Don't count lowmem mappings as memory used." into mnc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
99fbb56a0a
@@ -580,8 +580,8 @@ static long get_allocated_vmalloc_memory() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strstr(line, "ioremap")) {
|
if (!strstr(line, "ioremap") && !strstr(line, "map_lowmem")) {
|
||||||
// Ignore ioremap regions, since they don't actually consume memory
|
// Ignore ioremap and map_lowmem regions, since they don't actually consume memory
|
||||||
if (sscanf(line, "%*x-%*x %ld", &size) == 1) {
|
if (sscanf(line, "%*x-%*x %ld", &size) == 1) {
|
||||||
vmalloc_allocated_size += size;
|
vmalloc_allocated_size += size;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user