Pthreads - High memory usage

后端 未结 6 2018
梦谈多话
梦谈多话 2021-02-08 15:42

I am programming something in C that creates a lot of Pthreads in Linux on a 256Mb system. I usually have +200Mb free.

When I run the program with a low amount of thread

6条回答
  •  失恋的感觉
    2021-02-08 16:26

    The system threads library is just not designed to support large numbers of threads on systems with very limited memory. You need to either use a threading library designed for that purpose or, better, use fewer threads.

提交回复
热议问题