Return total footprint, not high water mark.
The mallinfo usmblks value returned by dlmalloc is a little misleading. It's not the current max, it's the historical high water mark. This leads to dumpsys meminfo producing native memory numbers that don't add up. Change this to the real total footprint, not this high water mark. Bug: 17265653 Change-Id: Id0293a1b50c9b0be8795405049f537a51ab0e8b7
This commit is contained in:
parent
7f4618cbc8
commit
f4ada9c9ce
@ -3526,7 +3526,9 @@ static struct mallinfo internal_mallinfo(mstate m) {
|
||||
nm.arena = sum;
|
||||
nm.ordblks = nfree;
|
||||
nm.hblkhd = m->footprint - sum;
|
||||
nm.usmblks = m->max_footprint;
|
||||
/* BEGIN android-changed: usmblks set to footprint from max_footprint */
|
||||
nm.usmblks = m->footprint;
|
||||
/* END android-changed */
|
||||
nm.uordblks = m->footprint - mfree;
|
||||
nm.fordblks = mfree;
|
||||
nm.keepcost = m->topsize;
|
||||
|
Loading…
x
Reference in New Issue
Block a user