aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/madvise.h
blob: 37172703bec604f05dfe4321d3c8b4a073a0f079 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once 
 
#include "defaults.h" 
 
#include <util/generic/array_ref.h>

/// see linux madvise(MADV_SEQUENTIAL) 
void MadviseSequentialAccess(const void* begin, size_t size); 
void MadviseSequentialAccess(TArrayRef<const char> data);
void MadviseSequentialAccess(TArrayRef<const ui8> data);
 
/// see linux madvise(MADV_RANDOM) 
void MadviseRandomAccess(const void* begin, size_t size); 
void MadviseRandomAccess(TArrayRef<const char> data);
void MadviseRandomAccess(TArrayRef<const ui8> data);
 
/// see linux madvise(MADV_DONTNEED) 
void MadviseEvict(const void* begin, size_t size); 
void MadviseEvict(TArrayRef<const char> data);
void MadviseEvict(TArrayRef<const ui8> data);

/// see linux madvise(MADV_DONTDUMP)
void MadviseExcludeFromCoreDump(const void* begin, size_t size);
void MadviseExcludeFromCoreDump(TArrayRef<const char> data);
void MadviseExcludeFromCoreDump(TArrayRef<const ui8> data);

/// see linux madvise(MADV_DODUMP)
void MadviseIncludeIntoCoreDump(const void* begin, size_t size);
void MadviseIncludeIntoCoreDump(TArrayRef<const char> data);
void MadviseIncludeIntoCoreDump(TArrayRef<const ui8> data);