Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stack size limit for If/Then statements?
#12
Quote: Ubuntu 20.04.6 LTS; RAM: 8031708 KiB (8GB);

On my other system (16gb, Core i7),

And there you have the issue. It's not OS. It's not a software limit. It's simply a case of one machine not having enough memory to compile such code. Go make the system swap file 64GB in size and the issue will probably disappear. Of course, compile times will increase drastically as you'll be using the hard drive as basically RAM, and it's much slower by nature.

As I mentioned, this was using 30+GB of RAM on my system to compile 65,536 lines of code written like you describe. That's more than BOTH your systems combined have available. If you expect to ever be able to do 16.7 million lines like this, you'll ***HAVE*** to find a different way. Restructure. Write programs in batch and have one shell out to another. Make this an external data file and look up find/replace entries via it. If 65,536 lines uses 30GB to compile, then I can only image that 16.7 millions of code would need *at least* 9+TB of memory to use, and would probably take years to compile.

What you have isn't expandable or substainable. You really need to go back to the drawing board and find a better way to automate this process.

And here's a question: Where are you getting the idea that STACK SIZE has *anything* at all to do with this program?? It uses no GOTO, no GOSUB. It has no RETURN statements. There's no RECURSIVE FUNCTION calls. There's *NO USE OF STACK* here at all.

You're not running into any sort of stack limit. This is a simple case of just running into MEMORY limits, and those are limited by your system. Your only real options are:

1) Go to the store and buy more memory and put it in your Linux machine.
2) Increase the swap file size to something outrageous and use the hard drive for "virtual memory".
3) Restructure and rewrite the program so that it's not something which is going to be trying to use 30+GB of RAM to compile and build.
Reply


Messages In This Thread
RE: Stack size limit for If/Then statements? - by SMcNeill - 01-29-2024, 08:46 PM



Users browsing this thread: 6 Guest(s)