The Daily Click ::. Forums ::. Klik Coding Help ::. Clearing memory?
 

Post Reply  Post Oekaki 
 

Posted By Message

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
22nd October, 2008 at 13:47:18 -

So in my game I'm trying to clear out chunks of memory between frames. I've just added a little bit that jumps to an intermediate frame between level frames. Just running the blank frame uses up 7mb ram (because it's got global events maybe?), but if you run the game then it uses up 13mb. Is it possible to clear that 5mb. Hoping to find a fix for that graphic/memory bug that replaces graphics, tried every other solution with no luck .

So... flushing memory?

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

nim



Registered
  17/05/2002
Points
  7230
22nd October, 2008 at 14:54:58 -

7Mb does seem a lot for a simple frame, but most people have quite a bit more than 13Mb free memory so I wouldn't worry about it.

It would be interesting to know if the memory is taken up by the Global Events. Perhaps Clickteam could add a little toggle in the next MMF update that would allow us to disable Global Events in some frames.

 
//

aphant



Registered
  18/05/2008
Points
  1242
22nd October, 2008 at 15:12:59 -

I think you're looking for "garbage collection." I think LUA and .NET have this functionality, so get to learning either of those and use those extensions! It'd be better if there were a GC extension, too.

A entirely blank frame uses 6MB. No events, no objects, nada.

 

Ricky

loves Left For Dead 2

Registered
  28/12/2006
Points
  4175

Has Donated, Thank You!Game of the Week WinnerVIP MemberWii OwnerHero of TimeGOTM Winner! - November 2009I am an April Fool
22nd October, 2008 at 15:17:13 -

are any of your object global?

 
-

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
22nd October, 2008 at 16:04:16 -

Ah yes, a blank 640x480 frame with no events/objects is 6mb. I guess that 1mb is from the global events after all. Ah well. And yes I do have a lot of global objects.

I've tried running a loop to create 25mb (what the running game peaks at) worth of actives too, in the hope that it 'overwrites' or whatever the previous graphics and loads them up again but it takes much too long.

Image Edited by the Author.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

aphant



Registered
  18/05/2008
Points
  1242
22nd October, 2008 at 16:38:12 -

I think I have a solution: "Load on Call" under the runtime options. From the help file:

This option saves memory, and accelerates loading time of big frames. If unchecked (default option), all the object's data are loaded at the beginning of the frame. For big objects on CD-ROM this can create a small delay when the frame appears.
If checked, and if the object is not created at the beginning of the frame, the object's data are not loaded at the beginning of the frame. They are only loaded when you create the object in the frame.


This might be useful if a lot of your global objects are particles and stuff.

 

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
30th October, 2008 at 18:07:41 -

Cheers Mr Phant! I never even thought of trying that, either that or the empty frame seems to have fixed the graphics bug. I was really worried that would cripple the entire project.

Sorry the reply took long too, only just managed to give it a full play through.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

aphant



Registered
  18/05/2008
Points
  1242
30th October, 2008 at 20:05:24 -

Hurray, I helped someone!

 
   

Post Reply



 



Advertisement

Worth A Click