Solved

Memory used by My app

Posted on 2000-05-04
3
135 Views
Last Modified: 2010-05-02
I can get the total memory or free memory using APIs.

I need some API to get the memory used by MY APPLICATION.

0
Comment
Question by:shahidi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 14

Expert Comment

by:wsh2
ID: 2779589
As Visual Basic dynamically uses / frees memory as it runs.. getting just the MY APPLICATION memory requirements is NOT going to be easy. The best you can do is take a Free Memory reading in an empty machine before loading your program, and then do a Free Memory API in your program after loading everything you possibly have in it.

Additionally please note.. that some of the underlying DLL's that VB uses are shared between multiple instances of running VB applications. If you Load MY APPLICATION once.. take a memory reading.. and then Load it a second time.. the memory usage readings in the second instance will be less as it is sharing resources that were loaded by the first instance of MY APPLICATION.

0
 

Author Comment

by:shahidi
ID: 2780140
OK can i get the memory used by one process...
Thanks
0
 
LVL 14

Accepted Solution

by:
wsh2 earned 50 total points
ID: 2780247
Do a free memory API before "SHELL"ing to it from a VB program and then start a timer that periodically monitors free memory recording the Maximum differences. Assuming Windows does not launch too many behind the scenes system tasks while you are doing this.. you can get an idea of how much memory is consumed.

Note: If you take a memory reading before launching your VB memory monitor, and then compare it to the VB memory reading you got before "SHELL"ing, you can get an idea of what size the base VB load modules are consuming.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question