User Profile

Collapse

Profile Sidebar

Collapse
tekninja
tekninja
Last Activity: Sep 13 '07, 10:34 PM
Joined: Aug 11 '07
Location: Buffalo, NY
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Thanks for the replies guys... that is exactly what I am doing. Unfortunately the solutions above, while making some sense are a little confusing to me (quite the programming nub unfortunately).


    The client is very simple ( and the server likewise) there is only one socket connection (ie one host:port )

    right now I have methods checking for network input and/or keyboard input in the same while loop... in fact...
    See more | Go to post

    Leave a comment:


  • There are several objects... mainly objects used to deal with network connectivity and IO.

    However the program is basically one recurring loop (until the user quits the chat client). This is unavoidable since it must be constantly looping and dealing with asynchronous network input as well as user keyboard input...

    I am guessing then it is this loop that causes the high CPU usage? Are there any strategies for minimizing...
    See more | Go to post

    Leave a comment:


  • why does my Java console program take up so much CPU time?

    I wrote a very simple instant messenger client but, unfortunately, since I am still a relatively new programmer I am not familiar with what causes a program to eat up so much CPU time. Currently at runtime my program takes up 11mb in memory and 90-100% cpu usage!!

    Without posting all the code, what factors contribute to cpu usage? I am not really sure what information would help others troubleshoot my program, so please let me know...
    See more | Go to post

  • tekninja
    started a topic can sizeof( <array> ) work in a function body?
    in C

    can sizeof( <array> ) work in a function body?

    I wanted to write a function to take the tedium out of dynamically determining the total number of elements in an array.

    Within the main method this is easy as I simply use:
    Code:
    sizeof( <array name> ) / sizeof( <array type> )
    However I am running into an annoying problem when trying to pass an array reference to a function that is suppossed to return the same value as the above would.

    my function...
    See more | Go to post
No activity results to display
Show More
Working...