MCPcopy Create free account
hub / github.com/DFHack/dfhack / flushCache

Method flushCache

library/Process.cpp:742–755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

740}
741
742bool Process::flushCache(const void* target, size_t count)
743{
744#ifndef WIN32
745#ifndef _DARWIN
746 __builtin___clear_cache((char*)target, (char*)target + count - 1);
747 return true; /* assume always succeeds, as the builtin has no return type */
748#else /* _DARWIN */
749 // FIXME: implement cache flush for MacOS (???)
750 return false;
751#endif /* _DARWIN */
752#else /* WIN32 */
753 return 0 != FlushInstructionCache(d->my_handle, (LPCVOID)target, count);
754#endif /* WIN32 */
755}
756
757#ifndef WIN32
758// returns -1 on error

Callers 1

writeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected