Mass reformat

This commit is contained in:
Imbus 2025-08-18 14:59:16 +02:00
parent 4d27def35e
commit df11e34235
27 changed files with 121 additions and 136 deletions

11
break.c
View file

@ -1,8 +1,8 @@
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <sys/mman.h> // mmap and friends
#include <unistd.h>
#include <stdbool.h>
int main(void) {
/*
@ -12,8 +12,7 @@ int main(void) {
* See: "man 3 getauxval" or
* https://www.man7.org/linux/man-pages/man3/getauxval.3.html
*/
long page_size =
sysconf(_SC_PAGESIZE); // or _SC_PAGE_SIZE (POSIX allows both)
long page_size = sysconf(_SC_PAGESIZE); // or _SC_PAGE_SIZE (POSIX allows both)
if (page_size == -1) {
perror("sysconf");
return 1;
@ -45,11 +44,9 @@ int main(void) {
* (which must be greater than 0).
*/
uint8_t *first_mmap = mmap(NULL, page_size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANON, -1, 0);
uint8_t *first_mmap = mmap(NULL, page_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
uint8_t *second_mmap = mmap(NULL, page_size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANON, -1, 0);
uint8_t *second_mmap = mmap(NULL, page_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
printf("First mmap: %p\n", first_mmap);
printf("Second mmap: %p\n", second_mmap);