Page 1 of 1

Can RAM be unloaded and over-written?

Posted: Tue May 10, 2016 10:45 am
by repkid
Basically I am making an .xml interpreter to load objects from an SD card onto a screen. This will eat RAM of course so I was wondering whether I can prevent a fragmented heap resulting in a memory overflow?

Re: Can RAM be unloaded and over-written?

Posted: Tue May 10, 2016 12:39 pm
by Roberthh
My experience about that, from a users view:
As soon as you do not need an object any more, it can be freed by garbage collection.
- used gc.collect() frequently to manually perform a garbage collection.
- avoid a high number of tiny and very big data objects. The latter may be hard to allocate, if the memory is fragmented.

Re: Can RAM be unloaded and over-written?

Posted: Wed May 11, 2016 8:51 am
by repkid
Thanks for the reply.