#include "stress.h" void usage(void) { printf("Usage: stress [-t n] [-m n]\n"); printf("\t-t n\tRun n processes parallel\n"); printf("\t-m n\tTest n MiB of Memory\n"); printf("\n"); printf("\t\tCan be combined\n"); exit(0); } void testMemory(unsigned long long size) { char *mem=malloc(size*sizeof(char)); unsigned long long i; unsigned char run=0; while(1==1) { for(i=0; i0) { usage(); } if(optflags & THREADS) { printf("Threads: %d\n", threads); } if(optflags & MEMSIZE) { printf("Memsize: %llu\n", memory); } for(i=0; i