[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
memory usage query
From: |
JuanPi |
Subject: |
memory usage query |
Date: |
Fri, 6 Nov 2015 11:22:30 +0100 |
Hi,
What is the best way to know how much memory is being used by octave variables?
whos doesn't do the trick since
A = rand(1e3);
whos
Variables in the current scope:
Attr Name Size Bytes Class
==== ==== ==== ===== =====
A 1000x1000 8000000 double
Total is 1000000 elements using 8000000 bytes
B = A;
whos
Variables in the current scope:
Attr Name Size Bytes Class
==== ==== ==== ===== =====
A 1000x1000 8000000 double
B 1000x1000 8000000 double
Total is 2000000 elements using 16000000 bytes
So it says we are using the double amount of memory, but afaiu B = A
did not create a copy of A, so the reported memory assumes COW was
executed.
--
JuanPi Carbajal
Public GnuPG key: 9C5B72BF
-----
The end of funding: "Many researchers were caught up in a web of
increasing exaggeration."
- Hans Moravec
- memory usage query,
JuanPi <=