Click here to Skip to main content
15,895,084 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: High CPU usage Pin
Code-o-mat22-Sep-11 23:57
Code-o-mat22-Sep-11 23:57 
And you think we will be able to figure it out without seeing anything of it? Please provide some code sniplets, preferably from the server. This does not mean the whole code.
Generally speaking:
You probably have a run-away thread (a thread that has a -possible- infinite loop that eats up the CPU). Try running your server with a debugger and when you see the high CPU usage, pause it and step trough the code to see what it does. If you see it running in circles, there you have it...
Try adding sleep(1) or such to let other threads breathe too.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<

AnswerMessage Removed Pin
23-Sep-11 1:37
rahul.kulshreshtha23-Sep-11 1:37 
GeneralRe: High CPU usage Pin
Erudite_Eric23-Sep-11 2:18
Erudite_Eric23-Sep-11 2:18 
AnswerRe: High CPU usage Pin
Erudite_Eric23-Sep-11 2:19
Erudite_Eric23-Sep-11 2:19 
AnswerRe: High CPU usage Pin
Chuck O'Toole23-Sep-11 4:59
Chuck O'Toole23-Sep-11 4:59 
QuestionIs CMap's PLookup thread safe ?? Pin
rahul.kulshreshtha22-Sep-11 21:26
rahul.kulshreshtha22-Sep-11 21:26 
AnswerRe: Is CMap's PLookup thread safe ?? Pin
Niklas L23-Sep-11 0:35
Niklas L23-Sep-11 0:35 
GeneralRe: Is CMap's PLookup thread safe ?? Pin
rahul.kulshreshtha23-Sep-11 1:35
rahul.kulshreshtha23-Sep-11 1:35 
Questionadding the image in Menu Pin
sarfaraznawaz22-Sep-11 20:01
sarfaraznawaz22-Sep-11 20:01 
AnswerRe: adding the image in Menu Pin
_Flaviu22-Sep-11 21:45
_Flaviu22-Sep-11 21:45 
AnswerRe: adding the image in Menu Pin
Richard MacCutchan23-Sep-11 0:01
mveRichard MacCutchan23-Sep-11 0:01 
QuestionDirectory Size Pin
john563222-Sep-11 17:06
john563222-Sep-11 17:06 
QuestionRe: Directory Size Pin
David Crow22-Sep-11 17:17
David Crow22-Sep-11 17:17 
AnswerRe: Directory Size Pin
john563222-Sep-11 17:41
john563222-Sep-11 17:41 
AnswerRe: How to get size of all files in a directory Pin
Software_Developer22-Sep-11 22:26
Software_Developer22-Sep-11 22:26 
QuestionCode Signing Considerations Pin
Bram van Kampen22-Sep-11 13:39
Bram van Kampen22-Sep-11 13:39 
Questionuse of child CFrameWnd in Visual Studio 2008 [SOLVED] Pin
Jim Crafton22-Sep-11 4:22
Jim Crafton22-Sep-11 4:22 
QuestionPlease give me some idea 3D surface of revolution Pin
appollosputnik22-Sep-11 4:17
appollosputnik22-Sep-11 4:17 
AnswerRe: Please give me some idea 3D surface of revolution Pin
Stefan_Lang22-Sep-11 22:39
Stefan_Lang22-Sep-11 22:39 
QuestionHow to free the memory if memory is allocation using memset Pin
hema_soft21-Sep-11 23:05
hema_soft21-Sep-11 23:05 
AnswerRe: How to free the memory if memory is allocation using memset PinPopular
Niklas L21-Sep-11 23:12
Niklas L21-Sep-11 23:12 
AnswerRe: How to free the memory if memory is allocation using memset Pin
CPallini21-Sep-11 23:49
mveCPallini21-Sep-11 23:49 
AnswerRe: You can use the function - free() after first calling malloc() Pin
Software_Developer21-Sep-11 23:54
Software_Developer21-Sep-11 23:54 
AnswerRe: How to free the memory if memory is allocation using memset Pin
Erudite_Eric22-Sep-11 2:58
Erudite_Eric22-Sep-11 2:58 
Questionc++ objects, I don't get it - IIS ADSI object Pin
jkirkerx21-Sep-11 18:57
professionaljkirkerx21-Sep-11 18:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.