#include #include #include #include static void *thread_with_guile(void *null) { return NULL; } static void *the_thread(void *args) { (void)scm_with_guile(thread_with_guile, NULL); // comment me to remove the memory leak return NULL; } int main(void) { // We create many threads while (1) { pthread_t ptid; pthread_create(&ptid, NULL, the_thread, NULL); void *ret; pthread_join(ptid, &ret); } return 0; }