MCPcopy Create free account
hub / github.com/catboost/catboost / EvictCache

Method EvictCache

util/system/file.cpp:806–816  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

804}
805
806void TFileHandle::EvictCache(i64 offset, i64 length) const noexcept {
807#if HAVE_POSIX_FADVISE
808 /*
809 * This tries to evicts only unmaped, clean, complete pages.
810 */
811 ::posix_fadvise(Fd_, offset, length, POSIX_FADV_DONTNEED);
812#else
813 Y_UNUSED(offset);
814 Y_UNUSED(length);
815#endif
816}
817
818bool TFileHandle::FlushCache(i64 offset, i64 length, bool wait) noexcept {
819#if HAVE_SYNC_FILE_RANGE

Callers 3

FlushSyncMethod · 0.45
EvictCacheMethod · 0.45
TestCacheMethod · 0.45

Calls 1

Y_UNUSEDFunction · 0.85

Tested by 1

TestCacheMethod · 0.36