diff options
| author | bors <bors@rust-lang.org> | 2023-06-20 14:18:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-06-20 14:18:46 +0000 |
| commit | b621c4d6003beef16a092b9eb6accad700847d5f (patch) | |
| tree | bfbed5f436894ada4983e6f72b3640c5d407ae27 /compiler/rustc_codegen_gcc/example/std_example.rs | |
| parent | f7690454117d30faff4f207cd5a002a4570ed45d (diff) | |
| parent | 8fc8f13ebd512ea9990d5178dcfbec48641fa842 (diff) | |
| download | rust-b621c4d6003beef16a092b9eb6accad700847d5f.tar.gz rust-b621c4d6003beef16a092b9eb6accad700847d5f.zip | |
Auto merge of #2520 - saethlin:mmap-shim, r=RalfJung
mmap/munmap/mremamp shims This adds basic support for `mmap`/`mremap`/`munmap`, with the specific goal of testing allocators targeting Linux under Miri. This supports `mmap` with `MAP_PRIVATE|MAP_ANONYMOUS`, and `PROT_READ|PROT_WRITE`, and explicitly does not support `MAP_SHARED` (because that's asking for MMIO) as well as any kind of file mapping (because it seems like nobody does `MAP_PRIVATE` on files even though that would be very sensible). And (officially) we don't support `MAP_FIXED`, so we always ignore the `addr` argument. This supports `mremap` only when the implementation is allowed to move the mapping (so no `MREMAP_FIXED`, no `MREMAP_DONTUNMAP`, and required `MREMAP_MAYMOVE`), and also when the entirety of a region previously mapped by `mmap` is being remapped. This supports `munmap` but only when the entirety of a region previously mapped by `mmap` is unmapped.
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/std_example.rs')
0 files changed, 0 insertions, 0 deletions
