Make sure those 39.3 are in fact MB and not MiB because that's more than 40x1000x1000 bytes
It should be safe to raise the size to 50 x 1000 x 1000. Do that, restart the program and try again. One of the following two things will happen:
1. The program crashes and you see "./luajit: not enough memory"
2. Everything works.
I hope it is the second, please let me know