Page 1 of 1

Increasing VM Memory?

Posted: May 5th, '18, 01:55
by Calloway
Is there anyway to increase the VM memory from the default 2 GB?
Would you have to recompile from source?

Also is there any way to publicly view and report issues/push fixes to the source code such as on Github or some other Git site?

Re: Increasing VM Memory?

Posted: May 18th, '18, 15:33
by MSandro
GP uses around 200 MB all the time on my system, even if the VM doesn't need all the memory.
And if the "memory used" block shows is right, GP seems to have some like a "memory leak" because, even if no project script is running, the used memory of the VM is rising fast, to about 90%. Then only a "collect garbage" triggered to reduce the need.

Re: Increasing VM Memory?

Posted: Jun 8th, '18, 13:39
by JohnM
Is there anyway to increase the VM memory from the default 2 GB?
As MSandro wrote, GP's memory space is 200MB by default. It isn't currently possible to change that, but it might make sense to add a command-line switch to do this.
And if the "memory used" block shows is right, GP seems to have some like a "memory leak" because, even if no project script is running, the used memory of the VM is rising fast, to about 90%. Then only a "collect garbage" triggered to reduce the need.
Yep, that's exactly GP's memory system works by design. As GP runs, it is constantly creating new objects (lists, strings, colors, temporary bitmaps, etc.) Many of those objects are just used for a little while, then forgotten. The forgotten objects are called "garbage". When the pool of free memory gets low, GP runs the "garbage collector", which discards all the garbage objects, packs all the remaining objects tightly together ("compaction"), and resets the free memory pool.

Re: Increasing VM Memory?

Posted: Jun 8th, '18, 13:51
by JohnM
Also is there any way to publicly view and report issues/push fixes to the source code such as on Github or some other Git site?
Not yet. We were planning to make the source code for the virtual machine available when GP 1.0 was released, but development has been slow since we lost funding last August, and it's not clear when GP will be ready for a 1.0 release. If and when the VM source code it released it will probably be under the Mozilla Public License 2.0.

Some folks have asked if they are allowed to make remixes/mods of GP. Sure! All the GP code in the "runtime" folder is open source under the MIT license. Thus, you could set up your own GitHub repository starting with a copy of the v81 runtime folder and go from there.

Re: Increasing VM Memory?

Posted: Jun 10th, '18, 12:54
by MSandro
Hi John, nice to read from you again in this forum :D
Those are very usefull informations. Because I've changed a lot in my GP runtimes folder, I will share it in this forum soon. I think a Github repo is a bit to much atm.

Re: Increasing VM Memory?

Posted: Jun 10th, '18, 23:08
by Calloway
Are you going to post your version of /lib, MSandro?

Re: Increasing VM Memory?

Posted: Jun 11th, '18, 19:30
by MSandro
Calloway wrote:
Jun 10th, '18, 23:08
Are you going to post your version of /lib, MSandro?
Yes soon, I would like to improve and clean up before publishing it.

Re: Increasing VM Memory?

Posted: Jun 11th, '18, 20:31
by Calloway
Hehe so I actually do need more memory because there is stack overflow when I work with 4K pictures (changing around pixels)