By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,369 Members | 1,138 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,369 IT Pros & Developers. It's quick & easy.

How to check the memory usage in VC

P: n/a
My question is, I want my program A have the ability to know how much
memory is used by itself. So after it finishes certain function, it
can print the total memory usage of itself to screen.

I didn't rewrite new() and delete() operations and do not want to do
that. I am expecting some windows APIs to achieve this. I used VC+
+.net in windows.

Appreciate much for any help.

Sticker

May 15 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Sticker wrote:
My question is, I want my program A have the ability to know how much
memory is used by itself. So after it finishes certain function, it
can print the total memory usage of itself to screen.

I didn't rewrite new() and delete() operations and do not want to do
that. I am expecting some windows APIs to achieve this. I used VC+
+.net in windows.
If you don't want the portable solution (your own new and delete),
you'll have to ask on a windows group.

--
Ian Collins.
May 15 '07 #2

P: n/a
On May 15, 2:37 pm, Sticker <sticker...@gmail.comwrote:
My question is, I want my program A have the ability to know how much
memory is used by itself. So after it finishes certain function, it
can print the total memory usage of itself to screen.

I didn't rewrite new() and delete() operations and do not want to do
that. I am expecting some windows APIs to achieve this. I used VC+
+.net in windows.

Appreciate much for any help.

Sticker
In windows you can use the API: GetProcessMemoryInfo, to get the
memory information of a process.

detail see:MSDN.

May 15 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.