+ 2

What does memory limit exceeded means, and how can i fix it?

I had a memory limit on one of my codes (not public), and the output contained the phrase memory limit exceeded. I tried to fix it, but I could not. How do you fix this problem?

2nd Mar 2018, 11:31 AM
junhengc4
junhengc4 - avatar
6 Answers
+ 3
These "How to fix this error?" questions without any code are mildly annoying to be honest... At least give us some context (what were you doing, what language, etc.) But better just post the code...
2nd Mar 2018, 12:11 PM
Alex
Alex - avatar
+ 3
Fact : Private codes can be shared as well in the Q/A threads...
2nd Mar 2018, 12:14 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
2nd Mar 2018, 12:13 PM
junhengc4
junhengc4 - avatar
+ 1
your while loop has an infinite loop and therefore appends until the memory limit is exceeded. you need to add "lol += 1" at the end of the loop
2nd Mar 2018, 12:18 PM
Alex
Alex - avatar
+ 1
oh
2nd Mar 2018, 12:27 PM
junhengc4
junhengc4 - avatar
+ 1
Too careless...
2nd Mar 2018, 12:27 PM
junhengc4
junhengc4 - avatar