locked
Memory Management RRS feed

  • Question

  • I have an application that is developed in MFC.  I decided to rewrite it so that other developers can help maintain the code.  I ended up writing it in C# .Net.  The applications look identical it would be very hard to tell them apart by just looking at the finished product.  Some of the code in the c# application actually uses dll's compiled in MFC.  Here is the part I cannot fix.  The MFC application uses 32MB of memory.   The c# application uses the 119MB of memory. These applications have the same design and the same amount of forms.  I understand the difference in native and il code.  But 87MB more memory used for the same application?  Anyone have any ideas how I can get that memory back down to earth?

    Thanks in advance

    Chris

    Friday, February 4, 2011 2:29 PM

Answers

  • Chris,

     

    Part of this (most of it) is the framework itself.  Using the .NET framework will cause the application to use more memory than an MFC application.  That being said, I'd recommend reading this article - not all of that memory is "real" used memory, parts of it are shared, too.

     

     


    Reed Copsey, Jr. - http://reedcopsey.com
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    • Proposed as answer by rob_v_ Friday, February 4, 2011 4:03 PM
    • Marked as answer by Jie Bao Monday, February 14, 2011 2:04 AM
    Friday, February 4, 2011 3:11 PM