Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Grant, AndrewAMD), 911 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Memory Management o.O #315734
03/18/10 16:45
03/18/10 16:45
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline OP
Expert
Slin  Offline OP
Expert

Joined: May 2005
Posts: 2,713
Lübeck
When looking at the debug panel everything is fine, but if I have a look at the task manager, each entity created from the same model file consumes about 2mb. I currently just have an empty function assigned to the entities. And it is a problem as I want to create about 2k of those entities and I currently just get a "crash in: SYS" message or something like that.
If I think right, it should only consume about the models file size one time + sizeof(ENTITY)*2000 which should only be like 5mb and not several gigabytes.
It would be great if someone could tell me what I am doing wrong or at least where this behaviour comes from.

Re: Memory Management o.O [Re: Slin] #315735
03/18/10 17:23
03/18/10 17:23
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Quote:
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////

function main() {
fps_max = 60;
video_mode = 11;

level_load(NULL);

while(1) {
ent_create("superku.mdl",nullvector,NULL);
wait(-1);
}
}


Seems to work fine, per new entity the task manager returns 90-100kb more (file is 2,4mb).

I know that you are an experienced user but have you got (by accident) somewhere "ent_clone" written in your code?

Last edited by Superku; 03/18/10 17:23.

"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 Management o.O [Re: Superku] #315737
03/18/10 17:33
03/18/10 17:33
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline OP
Expert
Slin  Offline OP
Expert

Joined: May 2005
Posts: 2,713
Lübeck
When writing ent_clone in the entity function the consumed memory just gets even more, so that seems to work laugh
It is always a bit more than 2mb per new entity for me, which is about the size of the mesh without texture. And there definatly is no ent_clone as it isn´t more than the code you show above.

Re: Memory Management o.O [Re: Slin] #315738
03/18/10 17:38
03/18/10 17:38
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
You're right, I removed the skin and multiplied the vertices and faces (to 55k). The model is now 3,6mb (mesh only, no skin) and the allocated memory in the task manager increases per new created entity by 3,6mb.


"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

Moderated by  HeelX, Spirit 

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