[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Discrepancy between actual RAM usage by Octave and "whos" output
From: |
Mike Miller |
Subject: |
Re: Discrepancy between actual RAM usage by Octave and "whos" output |
Date: |
Tue, 30 Oct 2018 12:38:19 -0700 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Sun, Oct 28, 2018 at 11:05:44 -0500, PhilipNienhuis wrote:
> What is the reason that actual RAM usage is so much larger than suggested by
> "whos"? Where does the overhead come from?
Cell arrays have a lot of memory overhead. Compare the memory used by
Octave instantiating
A = rand (1e7, 10);
with the memory used for
A = num2cell (rand (1e7, 10));
On my system, I see about 850 MB used for the first, 3.9 GB for the
second.
> A corrollary is that esp. for unwary users, "whos" actually gives deceiving
> results.
Yes, especially if you are using cell arrays with a large number of
cells.
--
mike
signature.asc
Description: PGP signature