|
📨 chic 0.0.0
Realtime-safe channels in C
|
Functions for pinning & unpinning memory regions. More...
#include <stddef.h>#include <stdbool.h>Go to the source code of this file.
Functions | |
| void * | chic_prefault (void *addr, size_t size) |
| Writes zeroes to several locations in a memory range to trigger page faults ahead of time. | |
Functions for pinning & unpinning memory regions.
| void * chic_prefault | ( | void * | addr, |
| size_t | size ) |
Writes zeroes to several locations in a memory range to trigger page faults ahead of time.
This is to prevent those page faults from happening later in a real-time context. Rather than zeroing the entire buffer, this function tries to only write once per memory page in the range addr to addr + size.
For best results, this memory range should be immediately pinned using chic_pin.
| addr | The beginning of the memory range to prefault |
| size | The length of the memory range to prefault |
addr