How do I get WIndows system memory information?
Forum rules
The FAQ is a read-only forum which is in general updated only by employees of Dyalog Ltd. It replaces the FAQ page which existed under http://www.dyalog.com. Rather than rejecting other posts to this forum, such posts will be put in a moderation queue, and moved to a more appropriate forum.
The FAQ is a read-only forum which is in general updated only by employees of Dyalog Ltd. It replaces the FAQ page which existed under http://www.dyalog.com. Rather than rejecting other posts to this forum, such posts will be put in a moderation queue, and moved to a more appropriate forum.
1 post
• Page 1 of 1
How do I get WIndows system memory information?
You can use ⎕NA to query the Windows Operating system to get Windows system memory information:
Example usage and output:
GlobalMemoryStatusEx
Load(%) 72
TotalPhys 16.9696215
AvailPhys 4.730630144
TotalPageFile 25.35632486
AvailPageFile 13.19555891
TotalVirtual 8796.092891
AvailVirtual 8795.017429
- Code: Select all
r←GlobalMemoryStatusEx;get;rc
⍝ See https://msdn.microsoft.com/en-us/library/windows/desktop/aa366770(v=vs.85).aspx
'get'⎕NA'U kernel32∣GlobalMemoryStatusEx ={U U {U U} {U U} {U U} {U U} {U U} {U U} {U U}}'
(rc r)←get⊂64 0,7⍴⊂0 0
:If rc≠1 ⋄ (⍕rc)⎕SIGNAL 11 ⋄ :EndIf
(2↓r)←1E¯9×(2*32)⊥∘⌽¨2↓r ⍝ Gigabytes
r←'Load(%)' 'TotalPhys' 'AvailPhys' 'TotalPageFile' 'AvailPageFile' 'TotalVirtual' 'AvailVirtual',⍪1↓¯1↓r
Example usage and output:
GlobalMemoryStatusEx
Load(%) 72
TotalPhys 16.9696215
AvailPhys 4.730630144
TotalPageFile 25.35632486
AvailPageFile 13.19555891
TotalVirtual 8796.092891
AvailVirtual 8795.017429
- Vince|Dyalog
- Posts: 432
- Joined: Wed Oct 01, 2008 9:39 am
1 post
• Page 1 of 1
Return to Frequently Asked Questions (FAQ)
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group