Equivalent to ARM __clear_cache for iOS devices

I transfer the library to the iPhone that makes the call __clear_cache. A little research will reveal this pleasant explanation of what he is doing.

This article lists the library features for Linux, Windows, and even Android. I don’t think there is an equivalent for iOS devices? Or some other workaround that I can implement?

+3
source share
1 answer

Since iOS is a NIX-based platform, and you can compile the code with the GCC version for Apple (LLVM-GCC 4.2), you just have to make a function call __clear_cache(), for example:

extern void __clear_cache(char *beg, char *end);

__clear_cache(beg, end);

Note that this will NOT work with Apple LLVM Compiler 3.1, only with GCC for some odd reason.

+5

All Articles