feat: Generate random value in the memory

This commit is contained in:
Louis Gallet 2024-09-13 17:43:38 +02:00
parent ed935bba14
commit 01688bc12b
Signed by: lgallet
GPG Key ID: 84D3DF1528A84511
2 changed files with 3 additions and 1 deletions

4
main.c
View File

@ -1,10 +1,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main() {
srand(time(NULL));
while (1) {
void* temp = malloc(1024);
*((long int*) temp) = 1024;
*((long int*) temp) = rand();
if (temp == NULL) {
printf("Memory is full\n");
break;

BIN
mian Executable file

Binary file not shown.