PCGen / pcgen

Main code and data development for pcgen program release
http://pcgen.org
GNU Lesser General Public License v2.1
432 stars 339 forks source link

Wrong calculation of available memory in Linux (pcgen.sh) #5796

Closed Farawen closed 5 years ago

Farawen commented 5 years ago

the script pcgen.sh, used for running pcgen in Unix-based system has a small problem in Linux:

To check available memory in Linux, it uses /proc/meminfo. More precisely, it extract the "MemFree" value, which is the amount of non allocated memory. Linux uses available memory as cache to speed-up IO, keeping only a small amount of unused memory. Cached memory is available for programs, but is not included in "Free".

Therefore, pcgen.sh should grep "MemAvailable:" instead of "MemFree:" (Line 10).

Thanks for all (Switching to JavaFX is at the same time great and hard work!)

karianna commented 5 years ago

@Farawen Are you able to submit a Pull Request for this?

bentemple commented 5 years ago

Farawen is totally correct about this. I had a similar issue several years back with my memory calculation scripts also had to switch to this memory value.