# RAM allocation of runtime in OSX

**URL:** <https://discourse.processing.org/t/ram-allocation-of-runtime-in-osx/23602>\
**Category:** Processing\
**Created:** [September 1, 2020, 2:46pm UTC](https://discourse.processing.org/t/ram-allocation-of-runtime-in-osx/23602 "2020-09-01T14:46:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![GSA\_IxD](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gsa_ixd/32/7554_2.png) [@GSA\_IxD](https://discourse.processing.org/u/GSA_IxD)\
**Post date:** [September 1, 2020, 2:46pm UTC](https://discourse.processing.org/t/ram-allocation-of-runtime-in-osx/23602/1 "2020-09-01T14:46:40Z")

</div>

Hi.

I am building a bespoke application for use in an art installation. I’m using OSX Catalina and Processing 3.5.4. I am loading hundreds of 1920 x 1080 PNG files into an ArrayList and after loading, running through the ArrayList displaying them at 30fps. Every time it loops it removes a random image from the ArrayList. It’s a video which sort of eats itself over time. This crazy method of playback is the best solution I can come up with for frame-accurate frame removal – video just not possible.  
Of course the app uses gigantic amounts of RAM – I had to adjust the Processing Preferences to run it. It runs fine in the editor using Present mode, but after I compile an OSX executable (containing Java) it loads for a while then quits. It seems the RAM isn’t being managed in the runtime or by OSX. My question is – is there any way of forcing allocation of RAM either through Processing or in the OS? Would this issue occur if it was running in Windows? Any info appreciated – thanks

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [September 1, 2020, 3:20pm UTC](https://discourse.processing.org/t/ram-allocation-of-runtime-in-osx/23602/2 "2020-09-01T15:20:28Z")

</div>

> [@GSA\_IxD](#):
>
> Of course the app uses gigantic amounts of RAM – I had to adjust the Processing Preferences to run it.

> [@GSA\_IxD](#):
>
> , but after I compile an OSX executable (containing Java) it loads for a while then quits.

Dunno how to change the executable itself but, if it’s called directly from the terminal, Java’s heap size can be increased:

> <https://stackoverflow.com/questions/1565388/increase-heap-size-in-java>

---

<div class="post-metadata">

**Author:** ![GSA\_IxD](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gsa_ixd/32/7554_2.png) [@GSA\_IxD](https://discourse.processing.org/u/GSA_IxD)\
**Post date:** [September 1, 2020, 4:09pm UTC](https://discourse.processing.org/t/ram-allocation-of-runtime-in-osx/23602/3 "2020-09-01T16:09:31Z")

</div>

Hi – thanks for the response. Can you point me in the right direction as regards how to do this from the Terminal? I’m not familiar and can’t make much sense of that StackOverflow thread

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [September 1, 2020, 4:40pm UTC](https://discourse.processing.org/t/ram-allocation-of-runtime-in-osx/23602/4 "2020-09-01T16:40:04Z")

</div>

I don’t own a Mac so I dunno how to help you out further, sorry. 😿

---

<div class="post-metadata">

**Author:** ![GSA\_IxD](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gsa_ixd/32/7554_2.png) [@GSA\_IxD](https://discourse.processing.org/u/GSA_IxD)\
**Post date:** [September 1, 2020, 4:42pm UTC](https://discourse.processing.org/t/ram-allocation-of-runtime-in-osx/23602/5 "2020-09-01T16:42:43Z")

</div>

No problem! Update on this – I note that if I remove the P2D parameter from fullScreen() it loads and runs, but not openGL accelerated. So it seems that it’s not the RAM but the openGL. It seems to hold the frameRate ok without acceleration so I think all good. Thanks

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [September 1, 2020, 4:50pm UTC](https://discourse.processing.org/t/ram-allocation-of-runtime-in-osx/23602/6 "2020-09-01T16:50:53Z")

</div>

You may try out renderer FX2D. But I dunno whether it works w/ **fullScreen()** though. 🤔
