我有一个缓存结构,想知道它占用的内存大小。
用 InteractiveUtils.varinfo
varinfo(r"cache")
他匹配出了一些函数
name | size | summary |
---|---|---|
fill_cache! | 0 bytes | typeof(fill_cache!) |
shortest_path_cache | 0 bytes | typeof(shortest_path_cache) |
但我的变量名是 cache ,竟然没有。 |
||
请问有其他的方法吗? |
我有一个缓存结构,想知道它占用的内存大小。
用 InteractiveUtils.varinfo
varinfo(r"cache")
他匹配出了一些函数
name | size | summary |
---|---|---|
fill_cache! | 0 bytes | typeof(fill_cache!) |
shortest_path_cache | 0 bytes | typeof(shortest_path_cache) |
但我的变量名是 cache ,竟然没有。 |
||
请问有其他的方法吗? |
一般直接调用 sizeof
就行