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.

Dark GDK / Memory usage of DGSDK / DX

Author
Message
Barnski
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: Switzerland, Zurich
Posted: 8th Feb 2006 19:52 Edited at: 8th Feb 2006 19:54
Hello,

I notized a strange memory consumption of dgsdk programs..

Right after executing, my programs take typically about 10MB of Memory (without loading any media). You can easily check this with the task manager.
But then, if you minimize your window, the program suddenly will only use about 2MB. Okay, could be that DX saves memory since it does not need to draw anything.
But, if you bring up the window again, the memory usage will stay that low! it will never reach the initial amount...

I really wonder why this is, does this mean I have to build in a standard function at the beginning of my program that minimizes and then maximizes the window, to use less memory??
OK, its only about 7 MB, but this is a question of principle you know

So does anyone understand this?

greets,
Barnski.

PS; forgot to mention that I tried this with debug and release version.. its the same phenomenon!

-- I just started with DarkSDK, by translating DBP Projects. --
re faze
20
Years of Service
User Offline
Joined: 24th Sep 2004
Location: The shores of hell.
Posted: 9th Feb 2006 03:56
sounds like .net activity, but its clearly c++...
hmm dont know, perhaps you should.

Smithy
19
Years of Service
User Offline
Joined: 8th Dec 2004
Location: Switzerland
Posted: 9th Feb 2006 08:24
Interesting topic, thanks Barnski! (*waves to his switzerland mate* heh)

I will try when I am back home, see if I encounter the same behaviour.
Sounds really strange.

Regards,
Smithy

//Awards: Best DM at NeverwinterConventionIII (NWCon3)
//Sys: Pentium IV 3200E/Prescott;800Mhz FSB;HT;WinXPPro;ATIR9700PRO;1024MB RAM(2x512MB"DualChanneled";VC++7.net;Delphi6;ADSL512;
Barnski
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: Switzerland, Zurich
Posted: 10th Feb 2006 15:43
So, did you encounter the same behaviour? *waves back*

I would really like to know why this happens..

-- I just started with DarkSDK, by translating DBP Projects. --
Smithy
19
Years of Service
User Offline
Joined: 8th Dec 2004
Location: Switzerland
Posted: 13th Feb 2006 08:28
Sorry mate, I had no time during the weekend, probably tonight...

Lets keep this updated...

//Awards: Best DM at NeverwinterConventionIII (NWCon3)
//Sys: Pentium IV 3200E/Prescott;800Mhz FSB;HT;WinXPPro;ATIR9700PRO;1024MB RAM(2x512MB"DualChanneled";VC++7.net;Delphi6;ADSL512;
Barnski
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: Switzerland, Zurich
Posted: 15th Feb 2006 16:31
I found out that this is a general behaviour of DirectX programs.

I checked the directX samples that come with the DX SDK, and the memory also gets freed when minimising the window, and stays low when restoring.

would be interesting to find out what exactly happens when minimising the window, and maybe, this could be called manually after the program starts to ensure absolute minimum memory usage

But Minimise and Restore works for now, so I m going on translating my DBP project...

greets,
Barnski.

-- I just started with DarkSDK, by translating DBP Projects. --
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 16th Feb 2006 11:05
I suspect its something along the lines of :

When a program starts Windows allocates enough memory for the program + whatever else it thinks is needed. When you come to minimise a program, it probably releases all direct x objects, and does a general memory cleanup, possibly removing the unneeded memory that it allocated previously. When restoring a window, it would restore all the objects, but not the memory.

Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
Smoke me a computer chip, I'll be baking breakfast.

Login to post a reply

Server time is: 2024-11-19 04:35:02
Your offset time is: 2024-11-19 04:35:02