Jump to content

How to check free RAM memory ?


Recommended Posts

Hi all,

I'm building a Vision application that will run on different PCs with different amount of RAM from 512Mo to 4Go.

Basically images will be acquired with a PCIe 1429 to the system memory, so in order to prevent the user from allocating more memory than disponible, I'd like to programatically get the amout of free ram memory (like we can see when opening window's task manager).

Is that possible and how ?

Thanks in advance for any help ;)

Link to comment
... What constructor shall I select from the list in the "Select constructor" window ?

You should not need to browse for DLLs...

On the block diagram, drop a .NET constructor node (Connectivity->.NET->Constructor Node). From its configuration dialog, select the 'System' assembly from the dropdown. Find the 'System.Diagnostics' entry in the objects list, expand its tree and select 'PerformanceCounter'. From the list of constructors, I chose the constructor prototype which takes two parameters, categoryName and counterName. Wire string constants to these as I showed in the BD snippet. Then you'll need a create a .NET method node for NextValue() as shown. Dispose of the reference when through.

If you're going to invoke this repeatedly, you should consider placing the constructor outside the loop, and maintain the reference wire for calling NextValue(). The .NET constructors seem to be pretty time-intensive to execute (in my experience).

Hope this is clear.

Dave

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.