Restricting memory available to Julia

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.

 $ 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?

3 Likes