The code is like this:
if ptr is a newly malloc buffer pointer, like
It may depend on the clImportMemoryARM() implementation about the memory attribute check.
Possibly, the third-party library pointer has different memory attributes (read/write/execute/shareability/cacheability) from newly malloced buffer pointer "ptr".