Slick Forums

Discuss the Slick 2D Library
It is currently Fri May 24, 2013 12:30 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu May 24, 2012 12:32 pm 
Offline

Joined: Sat Sep 17, 2011 10:38 am
Posts: 16
Edit: Turns out I'm dumb, the graph I was looking at wasn't "currently allocated" but "allocated overall".

Sorry for your time.


Hello.

I'm fairly clueless when it comes to memorymanagement and identifying memory leaks and such, but profiling a small game I've been working on turns up this:

Image

This is after the game has been running for about 10 minutes or so, and as far as I can tell I'm allocating about 600mb worth of float[]s while drawing some images.

Since I don't really know where to even begin, does anyone have any suggestion as to what I'm doing wrong? Is there anything I should be destroying after drawing in the gameloop? Or is this normal; the VM found some free memory and thought it'd look good with some floats?


Top
 Profile  
 
PostPosted: Thu May 24, 2012 8:10 pm 
Offline
User avatar

Joined: Sun Aug 07, 2011 4:48 pm
Posts: 87
Location: Recife, Brazil
As a matter of curiosity, what plugin/eclipse/ide are you using?
----
One of these days I checked my memory allocations with "Eclipse TPTP" and it accused me of using a lot of float[]. I think it has to do with the lwjgl and slick libraries... I have the same wonders as you =S I'm just sharing facts...

_________________
Skype: breno.inojosa


Top
 Profile  
 
PostPosted: Sat May 26, 2012 1:07 am 
Offline

Joined: Sat Sep 17, 2011 10:38 am
Posts: 16
The image is from the standard profiler that comes with NetBeans.

As far as I can tell from the image, 99.9% of all the float[]s allocated stem from the opengl.renderer.ImmediateModeOGLRenderer.glColor4f()-method, which I guess is called whenever you're drawing an image. Allocating about 1.8GB worth of float[]s over the course of 20 minutes doesn't appear to be a problem though, as the program seems to use about 25-30MB the entire time while running.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group