How to check the memory usage in VC

S

Sticker

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
 
I

Ian Collins

Sticker said:
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.
 
S

sss.zhou

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top