C-Beispiel-big.c
Zur Navigation springen
Zur Suche springen
Links
[Bearbeiten]big.c (schnell Platte füllen)
[Bearbeiten]#include <stdio.h>
#include <stdlib.h>
int main(int count, char** arg){
FILE* file = fopen("big.data", "w");
int size = 0x10000 * 128;
void* data = calloc(size, 1);
int mByte = 0;
while (fwrite(data, size, 1, file) > 0){
mByte += size / 1024 / 1024;
printf("%d MByte\n", mByte);
}
return 0;
}