If possible use BLOB mode AHWB instead of ashmem for a memory object created by ANNMemory_createFromDesc
Bug: 147777318
Test: NNT_static
Change-Id: I11d3afea445149c07fd78f2d211d28e323b9c2ae
Merged-In: I11d3afea445149c07fd78f2d211d28e323b9c2ae
Merged-In: I11d3afea445149c07fd78f2d211d28e323b9c2ae
(cherry picked from commit f3a2684855562719a5c181af4b12e46c51668a12)
(cherry picked from commit 603346b6b80cd4227d070162f1b16bb5838b2102)
diff --git a/runtime/ExecutionBuilder.cpp b/runtime/ExecutionBuilder.cpp
index 5905ea5..4ab401e 100644
--- a/runtime/ExecutionBuilder.cpp
+++ b/runtime/ExecutionBuilder.cpp
@@ -152,7 +152,7 @@
length)) {
return ANEURALNETWORKS_BAD_DATA;
}
- // For some types of memory, e.g. MemoryAshmem allocated from ANNMemory_createFromDesc, we
+ // For some types of memory, e.g. MemoryRuntimeAHWB allocated from ANNMemory_createFromDesc, we
// allow the client to specify offset == 0 && length == 0 indicating that the entire memory
// region is used. We update the length here because the drivers are still expecting a real
// length. For other memories that do not allow this semantic, it is checked in
@@ -213,7 +213,7 @@
length)) {
return ANEURALNETWORKS_BAD_DATA;
}
- // For some types of memory, e.g. MemoryAshmem allocated from ANNMemory_createFromDesc, we
+ // For some types of memory, e.g. MemoryRuntimeAHWB allocated from ANNMemory_createFromDesc, we
// allow the client to specify offset == 0 && length == 0 indicating that the entire memory
// region is used. We update the length here because the drivers are still expecting a real
// length. For other memories that do not allow this semantic, it is checked in