Computer Science Canada error: Not enough memory for dynamic array allocation |
Author: | smool [ Tue Mar 05, 2013 9:41 pm ] | ||
Post subject: | error: Not enough memory for dynamic array allocation | ||
So I have the following code:
My problem is that when ever I enter 5000000, I get that error. It happens right at the start, right on the line 'var primestemp : array 2 .. n of boolean'. Is there any way around this? Or do I have use a linked list structure? Please specify what version of Turing you are using Open Turing |
Author: | Insectoid [ Tue Mar 05, 2013 10:19 pm ] |
Post subject: | RE:error: Not enough memory for dynamic array allocation |
The problem is simple. Turing can't allocate an array that big. Why would you need one anyway? |
Author: | Raknarg [ Wed Mar 06, 2013 7:59 pm ] |
Post subject: | RE:error: Not enough memory for dynamic array allocation |
Probably for CCC2013, question 5. Needs to be able to take in a lot of numbers. |
Author: | Insectoid [ Wed Mar 06, 2013 8:04 pm ] |
Post subject: | RE:error: Not enough memory for dynamic array allocation |
Even so, you shouldn't need all of those numbers at once. |