?
Solved

Memory used by My app

Posted on 2000-05-04
3
Medium Priority
?
136 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 100 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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 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…
Suggested Courses
Course of the Month10 days, 1 hour left to enroll

762 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