LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get "memory used" by an EXE

Hi all,

Due to my hardware and software configuration, the EXE I built with LabVIEW 7.1.1 can not use more than 2Go of RAM.
The computer has 4Go and only runs my EXE so when I allocate memory for images (close to 2Go) LabVIEW can find contiguous memory.

Now I'd like to push the management of memory a step further from inside my EXE, so to know how much memory I can allocate, I need to know how much my EXE is using befrore trying to allocate ; in gfact exactly what I see in the task manager.

How can I do that ? I Guess .net could do that, or a dll call (maybe kernel32.dll or system32.dll) or a dos command. Smiley Surprised





We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 1 of 3
(3,093 Views)
As you are running on Windows, a very simple way to do this is to use System Exec and issue the "tasklist" command. This outputs a table that lists the processes and the memory usage. You can easily parse this string for your app.
Message 2 of 3
(3,058 Views)
Thanks a lot, this is exactly what I need !



We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 3 of 3
(3,052 Views)