[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #9924] Suggestion for a memory() function
From: |
Markus Mützel |
Subject: |
[Octave-patch-tracker] [patch #9924] Suggestion for a memory() function |
Date: |
Wed, 22 Apr 2020 08:57:14 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0 |
Follow-up Comment #5, patch #9924 (project octave):
The attached file can be compiled with
mkoctfile -lpsapi __wmemory__.cc
On the system here, I get these results when I call it:
>> [proc, sys] = __wmemory__ ()
proc =
scalar structure containing the fields:
PageFaultCount = 584161
PeakWorkingSetSize = 1.8735e+09
WorkingSetSize = 1.5450e+08
QuotaPeakPagedPoolUsage = 954832
QuotaPagedPoolUsage = 915912
QuotaPeakNonPagedPoolUsage = 60064
QuotaNonPagedPoolUsage = 54904
PagefileUsage = 1.4248e+08
PeakPagefileUsage = 2.3375e+09
sys =
scalar structure containing the fields:
dwMemoryLoad = 38
ullTotalPhys = 3.4225e+10
ullAvailPhys = 2.0961e+10
ullTotalPageFile = 3.6372e+10
ullAvailPageFile = 1.2759e+10
ullTotalVirtual = 1.4074e+14
ullAvailVirtual = 1.4073e+14
ullAvailExtendedVirtual = 0
This might be enough to get all the information needed to fill the return
values of "memory".
Apart from MaxPossibleArrayBytes on 32bit systems. But I don't know if we'd
need that for a first version...
I don't think we should include that as an .oct file in Octave. It would
probably be better as a DEFUN in sysdep.cc with fallback code for non-Windows
systems.
But I think the interface (i.e. the two returned structs) is good enough. So
if you want, you could start incorporating this in memory.m.
(file #48899)
_______________________________________________________
Additional Item Attachment:
File name: __wmemory__.cc Size:3 KB
<https://savannah.gnu.org/file/__wmemory__.cc?file_id=48899>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?9924>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Lars Kindermann, 2020/04/20
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Philip Nienhuis, 2020/04/20
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Lars Kindermann, 2020/04/21
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Markus Mützel, 2020/04/21
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Lars Kindermann, 2020/04/21
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function,
Markus Mützel <=
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Markus Mützel, 2020/04/22
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Philip Nienhuis, 2020/04/25
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Markus Mützel, 2020/04/25
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Philip Nienhuis, 2020/04/25
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Philip Nienhuis, 2020/04/30