18 lines
303 B
C
18 lines
303 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <time.h>
|
|
|
|
int main() {
|
|
srand(time(NULL));
|
|
while (1) {
|
|
void* temp = malloc(1024);
|
|
*((long int*) temp) = rand();
|
|
if (temp == NULL) {
|
|
printf("Memory is full\n");
|
|
break;
|
|
}
|
|
|
|
}
|
|
return 0;
|
|
}
|