Menu

threads in detach mode

Help
Erez
2008-05-18
2020-09-04
  • Erez

    Erez - 2008-05-18

    Hi,
    I have been integrating the server into our products, and so far with great results.
    Many thanks.

    One question,
    I am using the multi-threaded version with a thread pool of size zero.
    However, after issuing several tftp get operations, I notice that the server memory is getting bigger, and not returning to its original size. (I checked this with ps)
    I tried to look at the code for the reason of this problem. And I think it has to do with the mode you create the thread.

    If you use the following way to create the thread, the memory is returning to its original size:

    pthread_attr_t attr;
    pthread_attr_init(&attr);
    pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED);
    pthread_create(&threadId, &attr, processRequest, NULL)
    pthread_attr_destroy(&attr);

    thanks for your comments,
    erez

     
    • Achal Dhir

      Achal Dhir - 2008-06-02

      Thanks Eres,

      It was a good find and I have included with all future versions begining from 1.521.
      Keep posting.

      Thanks Again
      Achal Dhir

       
  • Donald1010

    Donald1010 - 2020-09-04

    At the point when you confine string it implies that you don't need to go along with() it before leaving primary() . String library will really sit tight for each such string underneath principle, however you ought not think about it. separate() is chiefly helpful when you have an assignment that must be done in foundation, yet you couldn't care less about its execution.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.