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.

DarkBASIC Discussion / Bizarre DBC bug... Perhaps can be used as an advantage?

Author
Message
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 26th Dec 2005 22:41 Edited at: 26th Dec 2005 22:43
Hi. Just wanted to post some details about this bizarre DBC bug regarding memory usage. (This works for me in 1.13, on an XP machine.)

Take a look at this extremely simple, windowed program:


Exec this, and then open up Task Manager (Ctrl+Shift+Esc, or ctrl-alt-del depending on w/e you feel like).

Look in the Processes list, and check out what DB.EXE's memory usage is.

Sorry 56k'ers for the 30kb odd of image there. Yeah my green theming is pretty ugly
Anyway, about the 13.5mb mark.

Now minimise the window...

Mem. usage shoots down to an astonishing 1.5mb-ish. This *could* be attributed to all of the DirectX surfaces temporarily being taken out of memory.

At least until the window is brought back again...
The result, courtesy of taskman?

2.5mb-ish, and yet the program is still fully functional.

Wtf is going on here, and has anyone got any ideas on how I can use it to make my programs better.
(API calls for minimising & restoring a window, for example.)

Support the AAANJL by doing nothing! Visit teh site below..
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 26th Dec 2005 23:09
That's weird. I tried my own in Pro and it does the same thing (only not as much memory taken up).



In the first section I got 5,572k the second 628k and the last 820k.


new programmer
19
Years of Service
User Offline
Joined: 20th Dec 2005
Location: right behind you.
Posted: 27th Dec 2005 03:29
WIERD!! what do you think it IS?

i might have an idea:

when a DBC/DBP program is started, it loads up ALL the directX stuff(including unneeded), but then later it figures out it doesn't need all that stuff?

i know im wrong, but atleast i tried
hyrichter
21
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 28th Dec 2005 20:53
This happens with any windows program, and is not a bug at all. Right now FireFox is using up about 28mb of RAM, but when it's minimized, it's only using about 1mb. This is mostly due to the fact that when it's minimized, windows doesn't have to worry about painting and refreshing the images, gui, etc. on the screen.

UFO
19
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 28th Dec 2005 22:54
It doesn't really change the fps though:

The fps is the same for both sections.

dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 29th Dec 2005 02:10
Well, maybe it changes the way it gets proccessed. I found the processor increased when minimized then brought back, when the program first started, the processor was hardly used, then it was used alot more.

Login to post a reply

Server time is: 2025-05-22 19:35:06
Your offset time is: 2025-05-22 19:35:06