Will running an infinite loop for longer time may exhaust the memory of the system or it will just keep running infinitely? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Will running an infinite loop for longer time may exhaust the memory of the system or it will just keep running infinitely?

24th Jun 2016, 12:18 PM
Harsh Eglesiaa
Harsh Eglesiaa - avatar
3 Antworten
+ 1
makes your CPU run hot. but I can't see you running out of ram... for a few years at least.
18th Jul 2016, 1:23 AM
James 'the bunyip' Ringhof
James 'the bunyip' Ringhof - avatar
0
it depends how complex the infinite loop actually is. in theory any loop will eventually exhaust the memory but it takes a complex loop to cause faster results
24th Jun 2016, 2:39 PM
Carlos Martinez
Carlos Martinez - avatar
0
by definition, an infinite loop will basically keep looping until your system memory runs out and your program crash (if you don't stop it)
6th Jul 2016, 6:32 PM
Keven Abellard
Keven Abellard - avatar