mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-22 10:59:51 +03:00
22 lines
429 B
C++
22 lines
429 B
C++
#include <LibC/stdio.h>
|
|
#include <LibC/unistd.h>
|
|
#include <LibC/mman.h>
|
|
|
|
int main(int c, char** v)
|
|
{
|
|
int fd = open("/");
|
|
if (fd == -1) {
|
|
printf("failed to open / :(\n");
|
|
return 1;
|
|
}
|
|
|
|
byte* memory = (byte*)mmap(nullptr, 16384);
|
|
printf("%p\n", memory);
|
|
memory[0] = 'H';
|
|
memory[1] = 'i';
|
|
memory[2] = '!';
|
|
memory[3] = '\0';
|
|
printf("%p : %s\n", memory, memory);
|
|
return 0;
|
|
}
|