madvise.h 1.1 KB

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include "defaults.h"
  3. #include <util/generic/array_ref.h>
  4. /// see linux madvise(MADV_SEQUENTIAL)
  5. void MadviseSequentialAccess(const void* begin, size_t size);
  6. void MadviseSequentialAccess(TArrayRef<const char> data);
  7. void MadviseSequentialAccess(TArrayRef<const ui8> data);
  8. /// see linux madvise(MADV_RANDOM)
  9. void MadviseRandomAccess(const void* begin, size_t size);
  10. void MadviseRandomAccess(TArrayRef<const char> data);
  11. void MadviseRandomAccess(TArrayRef<const ui8> data);
  12. /// see linux madvise(MADV_DONTNEED)
  13. void MadviseEvict(const void* begin, size_t size);
  14. void MadviseEvict(TArrayRef<const char> data);
  15. void MadviseEvict(TArrayRef<const ui8> data);
  16. /// see linux madvise(MADV_DONTDUMP)
  17. void MadviseExcludeFromCoreDump(const void* begin, size_t size);
  18. void MadviseExcludeFromCoreDump(TArrayRef<const char> data);
  19. void MadviseExcludeFromCoreDump(TArrayRef<const ui8> data);
  20. /// see linux madvise(MADV_DODUMP)
  21. void MadviseIncludeIntoCoreDump(const void* begin, size_t size);
  22. void MadviseIncludeIntoCoreDump(TArrayRef<const char> data);
  23. void MadviseIncludeIntoCoreDump(TArrayRef<const ui8> data);