diff --git a/src/utils/android/ashmem.cpp b/src/utils/android/ashmem.cpp index 0e1e81669..461c06239 100644 --- a/src/utils/android/ashmem.cpp +++ b/src/utils/android/ashmem.cpp @@ -80,3 +80,8 @@ int ashmem_get_size_region(int fd) { return ioctl(fd, ASHMEM_GET_SIZE, NULL); } + +int ashmem_purge_all_caches(int fd) +{ + return ioctl(fd, ASHMEM_PURGE_ALL_CACHES, NULL); +} diff --git a/src/utils/android/ashmem.h b/src/utils/android/ashmem.h index 2d6c0b5a4..278192b43 100644 --- a/src/utils/android/ashmem.h +++ b/src/utils/android/ashmem.h @@ -19,6 +19,7 @@ int ashmem_set_prot_region(int fd, int prot); int ashmem_pin_region(int fd, size_t offset, size_t len); int ashmem_unpin_region(int fd, size_t offset, size_t len); int ashmem_get_size_region(int fd); +int ashmem_purge_all_caches(int fd); #ifdef __cplusplus }