threads,memory and resources - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

threads,memory and resources

axxegfxaaxxegfxa Posts: 1Member
i have a code with 10 threads, each thread executes a loop, in each loop it executes a nslookup command shell ( 3500's nslookup aprox), but after a lot of iterations, one message apperars that it says:

"not enough resources... any idea???


  • rlcrlc Posts: 448Member
    [b][red]This message was edited by rlc at 2005-10-17 8:45:36[/red][/b][hr]
    Sounds like one of your loops is not exiting creating the infamous "infinite loop". You can do several things,

    1) check the code to ensure that the loops will terminate.

    2) run debug through loop, logging might be a bettter idea if you have a lot of code.

    3) download a memory profile program which will allow you to see what objects are taking what resources and what objects have live referneces still. (you can do a limited amount of this with the perfomance monitor in the os.)

    4) Also if your threads are pausing/waiting for any reason make sure to call a spin or sleep on them.


    EDIT: P.S. make sure top check in depth for an infinite loop before the other options, as a loop of this nature will eventualy make the whole machine poo poo.
Sign In or Register to comment.