# Restricting memory available to Julia

**URL:** <https://discourse.julialang.org/t/restricting-memory-available-to-julia/2613>\
**Category:** General Usage\
**Created:** [March 12, 2017, 12:09am UTC](https://discourse.julialang.org/t/restricting-memory-available-to-julia/2613 "2017-03-12T00:09:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbeltagy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbeltagy/32/130_2.png) [@mbeltagy](https://discourse.julialang.org/u/mbeltagy)\
**Post date:** [March 12, 2017, 12:09am UTC](https://discourse.julialang.org/t/restricting-memory-available-to-julia/2613/1 "2017-03-12T00:09:20Z")

</div>

I am running a small Julia webapp on Heroku. The machine on which Julia is running would report that report 60GB total memory and 5GB gree.

```bash
 $ free -g 
             total used free shared buffers cached
Mem: 60 54 5 0 2 11
-/+ buffers/cache: 40 19
Swap: 60 1 59

```

However, Heroku would start giving errors if my app consumes more that 1GB. Julia wouldn’t know that. I strong suspect that it does not do any garbage collection on the assumption that plenty of memory is available. Is there a way to tell Julia’s GC that it should run within some memory budget?
