samedi 25 juillet 2020

Thread stack size limitation

I am working on a project where in I have created a thread pool of 8 threads and each keep thread has its own queue where in data comes and then its picked by the individual threads and then processes it. Now, here as the thread stack size is 8MB, hence will my thread at any point run out of memory as these are never ending threads and these get killed only when the application goes down.

In these threads I have local STL containers( unnordered_map ) where in I keep on adding the data and also keep on deleting them. So, is there any chance by which my thread can report OOM error because its never ending one?...

Also, is there a way in which in c++11 we can increase the stack size of the thread?...

Aucun commentaire:

Enregistrer un commentaire