CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2001
    Location
    Trutnov, Czech Republic
    Posts
    459

    Windows memory management?

    Hi all.

    I've been told by my client that the server application I'm working on has inacceptable memory requirements, since after five days of nonstop running it gets 70 MB of memory (as shown in Task Manager). So I immediately checked the program in debug and gave it a stress to at least approximately simulate the utilization it has in real usage by the client.

    I found just some small leaks, which occur just once while starting the program, anyway. So nothing useful.

    Few hours later he mailed me again that after changing some settings in the program and clicking OK in that settings dialog, the memory usage fell to 16 MB.

    How is it possible? I checked the handler for OK button in that dialog, nothing special there.

    Do you have some explanation?

    I now something must go wrong because of those 70MB, but I don't understand the sudden fall after confirmating the dialog..

    Thank you for all suggestions.
    The sun is the same in the relative way, but you're older
    Shorter of breath and one day closer to death


    - Roger Waters, 1973

  2. #2
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,867

    Re: Windows memory management?

    I don't mean to be disrespectful - but if you don't understand what's happening, what chance have we got?? You don't give us any code to look at. You don't tell us what the program does. You don't say what the Settings dialog was for or what settings were changed to produce the improvement. What have we got to go on? We don't even know what version of Windows your client uses (some have better memory managaement than others). Also, did any errors occur during the 5 days? All this could be relevant information.

    My car broke down last week. Can you tell me what's wrong with it?

    On a more constructive note - from the information you've given, I'd recommend that you implement some kind of logging system. Every time you call a function that allocates memory, write that fact into a log file. Then write to the log file again whenever that memory is released. If errors occur during your program's lifecycle, write them to the log file too.

    Ask your client to run the program for 5 days with the original settings and then send you the log file. Then ask him to run for 5 days with the changed settings and send you that log file too. At the very least, you might be able to tell what the differences are when your client changes from the old settings to the new settings.
    Last edited by John E; November 27th, 2005 at 04:43 AM.
    "A problem well stated is a problem half solved.” - Charles F. Kettering

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured