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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
* Internal low-level memory mapping code for Slitter. We use C
* instead of relying on (unstable) `libc`.
*
* The corresponding Rust definition live in `src/map.rs`.
*/
/**
* Returns the system page size, or `-errno` on failure.
*/
int64_t ;
/**
* Attempts to reserve a region of address space of `desired_size`
* bytes.
*
* On success, returns the address of the first byte in the
* new region and overwrites `OUT_errno` with 0.
*
* On failure, returns NULL and overwrites `OUT_errno` with the
* `errno` from `mmap`.
*/
void *;
/**
* Attempts to release the region of address space starting at `base`,
* and continuing for `size` bytes.
*
* Returns 0 on success, and `-errno` on failure.
*/
int32_t ;
/**
* Attempts to back the region of address space starting at `base`
* and continuing for `size` bytes with actual memory. The caller
* must have first acquired ownership of the address space with
* `slitter__reserve_region`.
*
* The region will be safe for read and writes, but may be
* demand-faulted later.
*
* Returns 0 on success, and `-errno` on failure.
*/
int32_t ;
/**
* Attempts to back the region of address space starting at `base` and
* continuing for `size` bytes with memory from `fd`, starting at
* `offset`. The caller must have first acquired ownership of the
* address space with `slitter__reserve_region`.
*
* The region will be safe for read and writes, but may be
* demand-faulted later.
*
* Returns 0 on success, and `-errno` on failure.
*/
int32_t ;