Merge "Handle error returned by IBurstContext::freeMemory" am: f3bd4751a3 am: 1b085b37c8 am: 608210f72c am: 02d3a9485d

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1856680

Change-Id: I0c5ad0324f66c0e20a7c11c2eb7667c1018e36c0
This commit is contained in:
Michael Butler
2021-10-14 22:17:22 +00:00
committed by Automerger Merge Worker

View File

@@ -176,7 +176,10 @@ void ExecutionBurstController::MemoryCache::freeMemory(const nn::SharedMemory& m
std::lock_guard guard(mMutex);
const int32_t slot = mMemoryIdToSlot.at(memory);
if (mBurstContext) {
mBurstContext->freeMemory(slot);
const auto ret = mBurstContext->freeMemory(slot);
if (!ret.isOk()) {
LOG(ERROR) << "IBustContext::freeMemory failed: " << ret.description();
}
}
mMemoryIdToSlot.erase(memory);
mMemoryCache[slot] = {};