Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Memory leaks within AGK?

Author
Message
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 9th Mar 2013 19:15 Edited at: 9th Mar 2013 19:33
Hey.

I've been trying to investigate why my program RAM usage increases with time. As I went through all possible solutions, I commented my whole code down, leaving only agk::Sync() inside app::Loop(). Then I've been looking on memory usage. From ~17k it went to 27k within about 10 minutes. It kept raising though, so if I waited longer it'd use more RAM.

I am using Tier 2 and AppGameKit v1.076. Not sure whether this was reported before, but I'd like to hear your thoughts.

PS. After commenting our agk::Sync(), the issue dissapears, and memory usage is perfectly the same all the time through.

Also, I didn't create any sprites or anything, there was only agk::Sync().

PSS.
Just checked. Without sprites or ANYTHING created, it goes up by about 2k.
With few sprites & images, it goes up all the time.


@EDIT

It actually stops somewhere around 30k. Though, it doesn't seem normal to me, it might not be broken..

Follow me on twitter! @MotionStruct
Motion Struct blog
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th Mar 2013 19:43
This definitely sounds leaky!

Have you tried the same thing in v1088?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 9th Mar 2013 19:53
Nope. Yet to be done.

Follow me on twitter! @MotionStruct
Motion Struct blog
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th Mar 2013 19:55
Okay, I'll test it now.

Basically, I'll just run the v1088 template and watch the memory.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 9th Mar 2013 19:57
Alright, sounds fine. If it doesn't change too much, try loading up few images & display them with sprites.

Follow me on twitter! @MotionStruct
Motion Struct blog
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th Mar 2013 20:26
Initial tests with template that only syncs and one that prints "hello world".
sync-only - first run went to 16,936k in about 12k/sec increments then down to 16,904 stablish;second run 17,360k, stopped, dropped to 17,304k and stablish
with-print - first went up about 12k/sec to 17,760k, dropped to 17,048k and stablish; second went 16,760k (started at about 15,480) and stablish

I left both running and now the one that does nothing has crept up a bit to 17,564k and the print only is about 16,900k and both are fairly steady.

I think the AppGameKit engine actually gets upset if you don't give it something to display.

I added a sprite made with image zero (white), (second run) started at about 13,632k and went to stablish at 14,640-14,644k.

Next, a sprite from an image. start at 16,180k went to stablish at 17,328-17,380.

It looks like it takes a bit to decide where it is and then gets sort of stable, as long as nothing changes.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th Mar 2013 22:04
UPDATE: All of the apps have been running since last post and all have creeped up to more memory. Not huge amounts, but still not staying unchanged.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-05-03 07:44:21
Your offset time is: 2024-05-03 07:44:21