Solved

Memory used by My app

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

734 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