#include #include #include #include #include static void die(const char *msg) { fputs(msg, stderr); exit(1); } /* * Use a "longish" filename to make more trouble for the dcache. * * The inline length is 32-40 bytes depending on kernel config, * so make it larger than that. */ int main(void) { int i; char buffer[64]; memset(buffer, 'a', sizeof(buffer)); buffer[63] = 0; for (i = 0; i < 100000000; i++) { snprintf(buffer+40, sizeof(buffer)-40, "-%08d", i); if (open(buffer, O_RDONLY) >= 0) die("You're missing the point\n"); } return 0; }