Home Help Center

No memory leak using smart pointer?

buptstehcbuptstehc Member chuan huangOrganization: CISDI Information Technology Co., LtdProject: protocol adapter
Hi, all! I am writing a server with ice, which massively uses smart pointer. I found two wield things.
1. client send request to server periodically like this:
while(true) {
rpc(); // call rpc method this server provides.
sleep(1000); // sleep for one second.
}
everything is ok.

2. client send flooding request to server like this:
while(true) {
rpc(); // call rpc method this server provides.
}
the consumption of cpu and memory are rising very quickly.

so i want to know is this problem related to smart pointer, and when memory is revoked for reference-counting? please help!

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    It's difficult to say what could be causing these issues without more information:

    * What operating system, compiler, and Ice version are you using?
    * Can you provide a small example that reproduces the problem?

    Regards,
    Mark
  • buptstehcbuptstehc Member chuan huangOrganization: CISDI Information Technology Co., LtdProject: protocol adapter
    mes wrote: »
    Hi,

    It's difficult to say what could be causing these issues without more information:

    * What operating system, compiler, and Ice version are you using?
    * Can you provide a small example that reproduces the problem?

    Regards,
    Mark

    thanks for your reply! my environment is as follows:
    1. os: windwos server 2003
    2. compiler: msvc 9.0
    3. ice: 3.4.1

    after my app running for days, i noticed that the memory app consumes will rise continually at first to a very high value, and then drop to a very low value, and repeating this process. so i want know is this related to some mechanism of reference-counting? and is it possible to manually shorten the period of revoking memory?
  • buptstehcbuptstehc Member chuan huangOrganization: CISDI Information Technology Co., LtdProject: protocol adapter
    this thread has been closed. referring to unknown-exception-connection-monitor
Sign In or Register to comment.