Skip to content

Commit

Permalink
#3 add winDOS support. profit a lot
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Bergholz committed Jan 21, 2019
1 parent 40bc140 commit ea0c03a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions memory.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Copyright (C) 2012 - 2015 Markus Bergholz <markuman@gmail.com>
## Copyright (C) 2012 - 2019 Markus Bergholz <markuman@gmail.com>
## Copyright (C) 2015 JuanPi Carbajal <ajuanpi+dev@gmail.com>
## Copyright (C) 2019 Philip Nienhuis

## This program is free software; you can redistribute it and/or modify it under
## the terms of the GNU General Public License as published by the Free Software
Expand Down Expand Up @@ -57,7 +58,13 @@
"shared",mem(3),"data",mem(4), ...
"physical", total/1024);
else
error ("Function MEMORY is not available on this platform.");
process = "octave";
[~, d] = system ("tasklist");
d = strsplit (d, "\n")';
try
d = d(strncmpi (d, process, length (process)));
m = cellfun (@(x) sscanf (strrep (x(65:end), " ", ""), "%d"), d, "uni", 1);
end_try_catch
endif

endfunction

0 comments on commit ea0c03a

Please sign in to comment.