How the command whos works
古いコメントを表示
I wonder how the command whos works. I have found:
Memory Usage Reported By the whos Function. The whos function displays the amount of memory consumed by any variable. For reasons of simplicity, whos reports only the memory used to store the actual data. It does not report storage for the array header, for example.
When I campute the memory used, for example, by a structure, it seems to me that head is included in the computation. For example, the formula for memory used structure array is fields x ((112 x array elements) + 64) + data that includes header. This memory corresponds exactly to the quantity in bytes given by the command whos.
I should conclude that whos gives the amount of memory including header. Where am I wrong?
3 件のコメント
Sindar
2020 年 5 月 7 日
Where'd you get that description of the memory usage? I don't see anything like it on the documentation page, so it's possible it's outdated
Anna
2020 年 5 月 8 日
Steven Lord
2020 年 5 月 11 日
That page has at least one piece of out-of-date information on it. Complex arrays are no longer stored as separate pieces as of release R2018a. I'll report that to the documentation staff.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!