If they are joinable threads and you haven't called the pthread_join to join them, each produced thread will leak a sizeable amount of memory (at least 10mb per stack) after its termination.
如果它们是可接合的线程,且您没有调用pthread_join来联接它们,那么在线程终止后,每个产生的线程都将泄漏大量的内存(至少每堆栈10 MB)。
You can fix the leak by adding code to call pthread_join , which joins each joinable thread.
要修复泄漏,您可以添加代码调用pthread_join,该方法可联接每个可接合线程。
For example, because a hung thread might occur when a wait leak, excessive synchronization, or a deadlock scenario takes place, the hung thread problem consists of three scenarios.
例如,在出现等待leak、过量同步或死锁时会发生hung线程,因此hung线程问题包含这三种场景。
应用推荐