rendered paste body#define _GNU_SOURCE#include <sched.h>#include <unistd.h>#include <stdio.h>#include <stdlib.h>#include <sys/syscall.h>#define NUM_THREADS 64#define STACK_SIZE 4096char *stack[NUM_THREADS];int foobar(void *arg){ printf("thread %lu\n", (unsigned long)arg); fflush(stdout); while (1) pause(); return 0;}int main(){ unsigned long i; for (i = 0; i < NUM_THREADS; i++) { stack[i] = malloc(STACK_SIZE); clone(foobar, stack[i], CLONE_THREAD | CLONE_VM | CLONE_SIGHAND, (void *)i); } syscall(__NR_exit, 0);}