The completion port model from pigs increased postsend blog http://blog.csdn.net/piggyxp/article/details/6922277 himself, dosend and some error handling, under normal circumstances will not have what problem but now there is a kind of situations: when the client lost connection, then connect the memory increases, in blog comments also saw someone mentioned the problem, but in the end if there is no clear
I guess is that if a client connection is lost and the socket events did not deal with complete means that there is still a program memory locked by the system, the system will eventually return to fail so overtime this memory has not been released but what is the real situation is not clear so come to consult
CodePudding user response:
Then their maintenance a linked list of heartbeat mechanism to use to judge whether the client disconnects, disconnect the will release the corresponding memory, etc
CodePudding user response:
Well this list I have, I mean the overlapped IO that block
CodePudding user response:
VMMap is process of virtual and physical memory analysis utility, http://technet.microsoft.com/zh-cn/sysinternals/dd535533
CodePudding user response:
A TCP client connection abnormal disconnection cases, the server side is not to check, can be used in a heartbeat judge state of the client, the client can use the keep alive connections
CodePudding user response:
Chengbar
reference 4 floor response: a TCP client connection abnormal disconnect situation, is to check the server end, heartbeat mechanism can be used to judge the client, the client can use the keep alive connections I have a heartbeat mechanism not to this stage in asynchronous send for program memory lock on this CodePudding user response:
reference 5 floor tingtings324 reply: Quote: refer to 4th floor chengbar response: A TCP client connection abnormal disconnection cases, the server side is not to check, can be used in a heartbeat judge state of the client, the client can use the keep alive connections I have heartbeat point is not in this phase in asynchronous send for program memory lock this Memory locking and specific way of delivery about If the socket is closed, the socket associated the delivery object will return Saw before there is relevant article said, after the socket is closed, the delivery object for a long time did not timely return the condition of theThe measured only if each road link to ensure the same time a delivery object, You can avoid this kind of circumstance happening CodePudding user response:
Mechanism for examination to end an open your heart, will take the initiative to close the socket connection, release all memory, and the binding of CodePudding user response:
refer to 7th floor VisualEleven response: mechanism for examination to end an open your heart, will take the initiative to close the socket connection, release all memory, and the binding of Wow great god! Admire already a long time showing code slightly longer I posted in the blog can help to look at! Hey hey http://blog.csdn.net/tingtings324/article/details/54577077 CodePudding user response:
refer to 6th floor xian_wwq response: Quote: refer to the fifth floor tingtings324 reply: Quote: refer to 4th floor chengbar response: A TCP client connection abnormal disconnection cases, the server side is not to check, can be used in a heartbeat judge state of the client, the client can use the keep alive connections I have heartbeat point is not in this phase in asynchronous send for program memory lock this Memory locking and specific way of delivery about If the socket is closed, the socket associated the delivery object will return Saw before there is relevant article said, after the socket is closed, the delivery object for a long time did not timely return the condition of theThe measured only if each road link to ensure the same time a delivery object, You can avoid this kind of circumstance happening Well a single delivery object affects performance CodePudding user response:
"Pool" all resources (memory, socket,... )? CodePudding user response:
The references to the tenth floor zhao4zhong1 response: "pool" all resources (memory, socket,... )? Memory pool just in time and management way to optimize the memory management, if there is a memory leak, after will collapse CodePudding user response:
11 references tingtings324 response: Quote: reference to the tenth floor zhao4zhong1 response: "Pool" all resources (memory, socket,... )? Memory pool under just in time and management ways to optimize the memory management, if there is a memory leak, it's collapse will All memory "pool", namely, there is no any memory in the main loop applied for releasing action, which come of the memory leak? CodePudding user response:
refer to 12 floor zhao4zhong1 reply: Quote: reference 11 floor tingtings324 response: The Quote: reference to the tenth floor zhao4zhong1 response: "Pool" all resources (memory, socket,... )? Memory pool under just in time and management ways to optimize the memory management, if there is a memory leak, it's collapse will All memory "pool", namely, there is no any memory in the main loop applied for releasing action, which come of the memory leak? Fake fake release application CodePudding user response:
As long as there is in the main loop to any resource (memory, socket, handles, threads, GDI objects, the User object, database connection,... ) apply for release, is not strictly a "pool" of all the resources, CodePudding user response:
On the 14th floor zhao4zhong1 reference response: as long as there is in the main loop to any resource (memory, socket, handles, threads, GDI objects, the User object, database connection,... ) to apply for release, is not strictly a "pool" of all the resources of Well, I understand understand again