Bigger array size - more RAM consumption?
#4

Yes, memory is freed as soon as the function ends. The thing is: why would you need the extra space if you're not going to use anyway? As JernejL already pointed out, there is a reserved stack portion to which all local variables are saved during function calls. If you use too much large arrays, the stack can eventually overflow and cause all kind of errors where variables overwrite each other.
Reply


Messages In This Thread
Bigger array size - more RAM consumption? - by zgintasz - 16.07.2012, 07:59
Re: Bigger array size - more RAM consumption? - by JernejL - 16.07.2012, 08:21
Re: Bigger array size - more RAM consumption? - by zgintasz - 16.07.2012, 08:53
Re: Bigger array size - more RAM consumption? - by Vince - 16.07.2012, 09:55
Re: Bigger array size - more RAM consumption? - by zgintasz - 16.07.2012, 13:18
Re: Bigger array size - more RAM consumption? - by Vince - 16.07.2012, 13:23
Re: Bigger array size - more RAM consumption? - by zgintasz - 16.07.2012, 15:02

Forum Jump:


Users browsing this thread: 1 Guest(s)