Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Quad, TipmyPip, degenerate_762, AndrewAMD, Nymphodora), 997 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
MEMORY not Releasing #440653
04/29/14 14:54
04/29/14 14:54
Joined: Apr 2006
Posts: 28
LB, CA, USA
WINBERRY Offline OP
Newbie
WINBERRY  Offline OP
Newbie

Joined: Apr 2006
Posts: 28
LB, CA, USA
I am using A8, and working on a Terrain game where various images are displayed as the player moves across terrain. All is fine, except, it runs out of memory (F11/Memory MB/ ent - keeps increasing by 4 with every new ENT or BMAP even though both are removed, ie: starts at 16, keeps adding 28,32,36,etc. and I can find no way of getting the Memory/ent back down to start size

ALSO, seems *.PNG files are the biggest problem - is there a special way to display PNG? Should TGA be used instead?

Any help appreciated

thanks!

Last edited by WINBERRY; 04/29/14 16:58.
Re: MEMORY not Releasing [Re: WINBERRY] #440654
04/29/14 15:01
04/29/14 15:01
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
I can't comment on the BMAP problem, but for removing recently loaded entity files from the level cache there are the level_mark and level_free commands.

Re: MEMORY not Releasing [Re: jcl] #440667
04/29/14 17:06
04/29/14 17:06
Joined: Apr 2006
Posts: 28
LB, CA, USA
WINBERRY Offline OP
Newbie
WINBERRY  Offline OP
Newbie

Joined: Apr 2006
Posts: 28
LB, CA, USA
thanks, I tried that but can['t see a change:
I create an ENTIY*
assign it to an ent_create()..
...
then remove it: I have tried removing with ent_remove,ptr_remove, ent_purge
(you can see Im just stumbling around here...)

still the F11/Memory/ent increase by 4 with every run of that function

Re: MEMORY not Releasing [Re: WINBERRY] #440668
04/29/14 17:42
04/29/14 17:42
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Post the relevant code then.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: MEMORY not Releasing [Re: Superku] #440672
04/29/14 19:06
04/29/14 19:06
Joined: Apr 2006
Posts: 28
LB, CA, USA
WINBERRY Offline OP
Newbie
WINBERRY  Offline OP
Newbie

Joined: Apr 2006
Posts: 28
LB, CA, USA

Wie Gates! und Danke....



ENTITY* myGIANTimage;
function imageGiants()
{
myGIANTimage = ent_create("GIANTS1.png",vector(0,0,0),placeGiants);
}
action placeGiants()
{
wait(-4);
removeGiants();
}
function removeGiants()
{
wait(1);
//ent_purge(me);
//ent_remove(me);
ptr_remove(me);
}

*/

Every time I use this function MEMORY/ent += 4 -- and within a few minutes, ERROR: Out of Memory

thanks

P.S. I hope I posted this code appropriately...

Re: MEMORY not Releasing [Re: WINBERRY] #440674
04/29/14 19:45
04/29/14 19:45
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
as I remember png is loaded by directx and not by an engine function and not recommended, earlier I had some problems with it. does the same happen with tga or dds?


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: MEMORY not Releasing [Re: sivan] #440676
04/29/14 20:03
04/29/14 20:03
Joined: Apr 2006
Posts: 28
LB, CA, USA
WINBERRY Offline OP
Newbie
WINBERRY  Offline OP
Newbie

Joined: Apr 2006
Posts: 28
LB, CA, USA
Yes, I have tried *.PNG, *.BMP, *.TGA, they all do the same thing...I don't remember having this issue before...could it be my current release of A8?

Re: MEMORY not Releasing [Re: WINBERRY] #440680
04/29/14 23:53
04/29/14 23:53
Joined: Apr 2006
Posts: 28
LB, CA, USA
WINBERRY Offline OP
Newbie
WINBERRY  Offline OP
Newbie

Joined: Apr 2006
Posts: 28
LB, CA, USA
..well, I just created a LEVEL game using *.PNG, and though the MEMORY/ent rises, it also falls resulting in steady memory... sorry for the miss guide on the PNG, I haven't figured out what the main memory issue is (and I did reload GStudio 7.9 just to check - same issue with same program), but thanks for the help-much appreciated!

Re: MEMORY not Releasing [Re: WINBERRY] #440748
05/01/14 00:28
05/01/14 00:28
Joined: Apr 2006
Posts: 28
LB, CA, USA
WINBERRY Offline OP
Newbie
WINBERRY  Offline OP
Newbie

Joined: Apr 2006
Posts: 28
LB, CA, USA
FYI: Here is what I found to fix "leak"


wait(1);
ent_purge(me);
ent_remove(me);
wait(-2);

NOTE: this DID NOT WORK

ent_purge(me);
wait(1);
ent_remove(me);
wait(-2)

Seems I had to both purge the mem and remove the ENT at the exact same time.
Just putting the wait(1) between, allowed the MEMORY/ent to add onto itself

ALSO: I played with the wait(-2) which seemed as low as I could go without out leaking again.

Don't know enough to know why, but I posted this in case it can help someone else..

Re: MEMORY not Releasing [Re: WINBERRY] #440882
05/05/14 10:25
05/05/14 10:25
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Wait() has nothing to do with releasing memory. If your second version did not work, then the entity was probably still rendered in the level, and thus the purged video memory was immediately allocated again.


Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1