Fix unnecessary DmaBuffer copying in getIonMappedSizeKb

Change the loop to access DmaBuffer by reference rather than copying it.

Bug: 138148041
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I47fb49deb46d24897d75f350f4b47679cad37542
This commit is contained in:
Suren Baghdasaryan
2019-12-20 09:05:14 -08:00
parent 2410d67357
commit af4d763b73

View File

@@ -826,7 +826,7 @@ static jlong android_os_Debug_getIonMappedSizeKb(JNIEnv* env, jobject clazz) {
}
}
for (dmabufinfo::DmaBuffer buf : dmabufs) {
for (const dmabufinfo::DmaBuffer& buf : dmabufs) {
ionPss += buf.size() / 1024;
}