feat: ✨ Generate random value in the memory
This commit is contained in:
parent
ed935bba14
commit
01688bc12b
4
main.c
4
main.c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user