aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/madvise.h
blob: 606733152ed96d80a51e2135d3b0d0f08a2bd377 (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);