Memory Issue

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
gamerdez
Posts: 9
Joined: Mon Nov 10, 2008 8:29 am

Memory Issue

Post by gamerdez »

is there any such thing in the engine that it uses a fixed amount of memory for certain objects irrespective of its size, like a b3d model would take minimum 2 MB or a jpg/bmp/tga would take a minimum of 1 MB.

Would really appreciate an answer.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Could you explain the reason one would want such a thing? Because if the images or mesh doesn't fit into this amount, what will happen? And how much memory would you allow for intermediate states?
gamerdez
Posts: 9
Joined: Mon Nov 10, 2008 8:29 am

Post by gamerdez »

My game is taking up a lot of RAM, and a guy said he went through the Engine code and found that it is the case....so i want to know whether it is true???

any idea???
jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

Post by jontan6 »

has he shown the code he believed to cause this?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

No, there's no minimum that is (pre-)allocated for a mesh or texture. The memory consumption is directly related to the size (dimensions) and type of the mesh/image/texture. During loading of those elements more memory might be (and often is) used, but it's properly freed afterwards.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Yes, but "a guy" says otherwise, so who do we believe. ;)
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Eigen
Competition winner
Posts: 375
Joined: Fri Jan 27, 2006 2:01 pm
Location: Estonia
Contact:

Post by Eigen »

The guy, of course.

gamerdez, how much RAM is your game taking up?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Yeah if your buddy can show us the code which he thinks is causing the problems we might be able to comment ;)
Image Image Image
jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

Post by jontan6 »

maybe the guy dont exist
skumar
Posts: 201
Joined: Thu Feb 14, 2008 6:24 pm
Location: kerala state india
Contact:

Post by skumar »

hi devs of irrlicht....

is there any way we can optimize memory usage....

Dont say to cut the textures down.....

any other way.....
skumar
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

textures probably are the biggest sucker of memory... what sizes are you using and how many?

are you cleaning out the ones you don't use for the current level? Same with meshes?

are you sure irrlicht is the cause and possible not something within your code?
Image Image Image
gamerdez
Posts: 9
Joined: Mon Nov 10, 2008 8:29 am

Post by gamerdez »

we have not been successful in clearing the meshes and the textures....
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

How so? What have you tried? Obviously if your game is going to have varying levels with different assets in them you need to manage them properly as you probably won't be able to get away with all of them loaded into memory at once!
Image Image Image
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

skumar wrote:hi devs of irrlicht....
You've got the same source code as us. :P

skumar wrote:is there any way we can optimize memory usage....
If you're profiling speed or memory usage, you should always be doing a release build of Irrlicht and your application. Don't (literally) waste your time profiling a debug build.

Irrlicht 1.5 (available on branches/releases/1.5 now) will reduce the memory usage by freeing some texture memory that was being held unnecessarily.

Beyond that, well, we're always open to ideas.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

rogerborg wrote:Irrlicht 1.5 (available on branches/releases/1.5 now) will reduce the memory usage by freeing some texture memory that was being held unnecessarily.
Unfortunately, this is till not true for OpenGL, because I didn't manage to add the necessary texture flags for optimized memory handling. But this will be made in the early phases of 1.6! Just as compressed textures :wink:
BTW: Was that a joke, skumar? Or a serious question?
Post Reply