Solved

Memory used by My app

Posted on 2000-05-04
3
132 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
  • 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

785 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