reaper: fix spacing
This commit is contained in:
parent
3560ec838c
commit
bb763eb5e1
32
src/reaper.c
32
src/reaper.c
|
@ -7,20 +7,24 @@
|
|||
void * mem[16];
|
||||
|
||||
int main() {
|
||||
int i;
|
||||
for(i=0; i < 16; i++) {
|
||||
mem[i] = malloc(AMOUNT); // One gigabyte XXX do not do this
|
||||
memset(mem[i], 0, AMOUNT);
|
||||
printf("Allocated %d GB of ram...\n", i+1);
|
||||
}
|
||||
int i;
|
||||
for(i=0; i < 16; i++) {
|
||||
mem[i] = malloc(AMOUNT); // One gigabyte XXX do not do this
|
||||
memset(mem[i], 0, AMOUNT);
|
||||
printf("Allocated %d GB of ram...\n", i+1);
|
||||
}
|
||||
|
||||
printf("16 GB of memory used, waiting for input... ");
|
||||
printf("16 GB of memory used, waiting for input... ");
|
||||
|
||||
while(1) {
|
||||
printf("Trashing ram use...\n");
|
||||
while(1) {
|
||||
printf("Trashing ram use...\n");
|
||||
|
||||
for(i=0; i < 16; i++) {
|
||||
memcpy(mem[i], mem[(i+1)%16], AMOUNT);
|
||||
}
|
||||
}
|
||||
}
|
||||
for(i=0; i < 16; i++) {
|
||||
memcpy(mem[i], mem[(i+1)%16], AMOUNT);
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0; i < 16; i++) {
|
||||
free(mem[i]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue