This commit is contained in:
2025-09-03 12:18:38 +02:00
parent d523d15990
commit 990b724df5
12 changed files with 15 additions and 21 deletions

9
tp/tp1/src/ex2/buf.c Normal file
View File

@@ -0,0 +1,9 @@
#include "helpers.h"
static char buffer[16 MB] = {0};
int main(int argc, char **argv)
{
randomize(buffer, 16 MB);
return interlude();
}

View File

@@ -1,15 +0,0 @@
#include "helpers.h"
#include <stdio.h>
static char buf[16 MB] = {0};
int main(int argc, char **argv)
{
buf[0] = 12;
long int ad;
printf("buf = %p\n",buf);
ad = (long int)buf;
ad = (ad & 0xfffffffff000) + 0x1000 - ad ;
buf[ad - 1] = 13;
//randomize(buf, 16 MB);
return interlude();
}