# Discrepancy betwteen \`htop\` and \`sum(map(x-\>sizeof(x),names(Main)))\`

**URL:** <https://discourse.julialang.org/t/discrepancy-betwteen-htop-and-sum-map-x-sizeof-x-names-main/66629>\
**Category:** General Usage\
**Tags:** question, package, memory, memory-allocation\
**Created:** [August 18, 2021, 8:59pm UTC](https://discourse.julialang.org/t/discrepancy-betwteen-htop-and-sum-map-x-sizeof-x-names-main/66629 "2021-08-18T20:59:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkarikom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkarikom/32/7096_2.png) [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Post date:** [August 18, 2021, 8:59pm UTC](https://discourse.julialang.org/t/discrepancy-betwteen-htop-and-sum-map-x-sizeof-x-names-main/66629/1 "2021-08-18T20:59:44Z")

</div>

#### 1. Check the total size of stuff julia knows about: `sizeof`

I get a negligible value when I check the size of the environment:

```julia-auto
GC.gc()
julia> sum(map(x->sizeof(x),names(Main)))/1e6 # total size in megabytes
0.000598

```

#### 2. Check the size of stuff linux knows about: `htop`

This is in contrast to what `htop` shows, where `RES` shows a whole bunch of `julia/sys.so` (what is that?) alone take up nearly 50GB:

 ![htop](https://global.discourse-cdn.com/julialang/original/3X/8/b/8ba4156d31cfa249938cb5a374138f6c041c3a8c.jpeg)
