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 / Empty Code, No Resources = 192MB of RAM ???

Author
Message
psx
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location:
Posted: 21st Jul 2007 10:56
Hello everyone. I'm working with DarkGameSDK, and a little question bugs me.
With an empty code frame ( just LoopSDK() ), and no resource loaded,
SDK eats 192MB of RAM.
It too heavy. What should I do.
Is it that, and I can do nothing?
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 21st Jul 2007 16:20
I suspect you run a machine with way too little memory to begin with if 192mb is too much to give up. What are your specs?

My DBP plugins page is now hosted [href]here[/href]
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 21st Jul 2007 17:17 Edited at: 21st Jul 2007 17:18
Quote: "I suspect you run a machine with way too little memory to begin with if 192mb is too much to give up. "

Well I think most people would find ~200MB too much to give up for a blank screen.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 22nd Jul 2007 01:04 Edited at: 22nd Jul 2007 01:05
i would agree... 200MB would seem to be a tad much for such a minimal app...

may i ask exactly how did you determine the memory usage psx...

i'm running a generic app (release version, developed with the gdk), in a fullscreen window, with a single animated mesh, two cubes, and a sphere... and the task manager shows it's using all of 13,920K...

--Mike
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 22nd Jul 2007 01:48 Edited at: 22nd Jul 2007 01:53
Quote: "Well I think most people would find ~200MB too much to give up for a blank screen"

I would agree, but I wasn't asking you, I was asking him for his specs. 192mb on todays 2gig standard isnt much at all in the big scheme, in general, but 192mb for an app thats doing nothing is excessive, yes. Instead of questioning my response why not try and help by asking q's of the original poster, instead of looking for stupid sh*t to get yourself mixed up in.

My DBP plugins page is now hosted [href]here[/href]
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 22nd Jul 2007 11:53 Edited at: 22nd Jul 2007 11:54
Wow, talk about rudeness. I would suggest anger management.

When did he explicitly say that 192MB was too much for his system? Oh yeah - he didn't. Maybe he meant it's too much for a blank screen?

Either way, don't be so quick to overreact to someone who's making a valid point, it just makes you look like an ass. If you feel your response was justified, you can e-mail me, it's best to not fill this thread with unrelated posts.

Back on topic. As Red Ocktober pointed out, a minimal app in DGDK only uses about 13MB of memory, which I would expect (I wouldn't know, as I don't have DGDK). I'm guessing either psx is obtaining the memory usage wrong, or something is going very wrong here.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 22nd Jul 2007 17:32
Yes, I was purposely rude - because your original post had nothing to do with helping him, and it had everything to do with pointless trolling.

Quote: "...I wouldn't know, as I don't have DGDK..."


right, so why are you here? Oh right - trolling.

My DBP plugins page is now hosted [href]here[/href]
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 22nd Jul 2007 18:09 Edited at: 22nd Jul 2007 18:22
Quote: "right, so why are you here? "

To see if I could help - however I will abstain from doing such a thing if people like you are going to start arguments for no reason.

Quote: "Yes, I was purposely rude - because your original post had nothing to do with helping him, and it had everything to do with pointless trolling."

It was NOT trolling, it was making a valid point, I would help if I could. You are a paranoid idiot. If you ask me, your post after mine was nothing less than trolling. This couldn't have anything to do with your grudge against me could it?

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 22nd Jul 2007 18:19
I found this by accident. I don't think that Benjamin was out of line with his statement. Unfortunately, I feel that you were CR.

It is a valid question. The original question has nothing to do with the computer having a problem running the 192mb program. Rather, it is a question about the cause of that much memory being used. My understanding is that there is no problem at all, that they just looked in the memory usage in the task manager and had some concern about it.


Come see the WIP!
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 22nd Jul 2007 18:24
Seems some people don't know their terminology! When looking at the global resource of 100% undisputed fact aka wikipedia we see that in http://en.wikipedia.org/wiki/Internet_troll it says "In Internet terminology, a troll is someone who intentionally posts derogatory or otherwise inflammatory messages about sensitive topics in an established online community such as an online discussion forum to bait users into responding."

When all Benjamin merely pointed out that almost 200mb of RAM usage for a blank screen is excessive(which it is), your post implied that the loss of 200mb for nothing was acceptable and that the solution was to upgrade their PC.

If you're getting annoyed over a post like that then it seems you haven't seen the amount of crap that gets posted in other boards or you have a grudge against Ben.

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 22nd Jul 2007 18:46
Quote: "It was NOT trolling, it was making a valid point, I would help if I could. "

right, but you couldnt, other than to comment about my post, not about what his (psx's) problem was. wouldnt it have been better not to post at all then? Yes it would have, but you used the opportunity to try and dig at me. Thats trolling.

Quote: "You are a paranoid idiot."

more name calling? tsk, tsk... you should know better.

Quote: "If you ask me, your post after mine was nothing less than trolling."

thats your opinion. had you not made your useless post we wouldnt be having this conversation. At least I asked him his specs, to try and work towards finding out whats going on. You cant say the same.

Quote: "This couldn't have anything to do with your grudge against me could it?"

The only grudge there ever was was the bs you started when you decided to slander me, telling people I was ripping them off... wanna go back down that road again and air that whole story publically? I doubt you do. But, nonetheless, that whole fiasco was water under the bridge and you know it. I recall having yip-yapped with you on irc since then. Now suddenly I have a "grudge" again? That makes no sense, as you well know. I didnt appreciate your original post and said so, thats all.

addressing Cash and DC would be redundant. They are entitled to their opinions. I do find it funny that they "suddenly" posted here out of the blue. I dont recall those two being in this particular forum much, but hey, "random" things happen I guess.

My DBP plugins page is now hosted [href]here[/href]
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 22nd Jul 2007 19:00
Anyway! Speaking of posts that don't help...

"It's like floating a boat on a liquid that I don't know, but I'm quite happy to drink it if I'm thirsty enough" - Me being a good programmer but sucking at computers
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 22nd Jul 2007 19:03 Edited at: 22nd Jul 2007 19:05
Quote: "thats your opinion"

Same goes for your accusations.

Quote: "wouldnt it have been better not to post at all then?"

Believe me, if I had have known you were this paranoid I wouldn't have done. I just thought you were inferring that 192MB of wasted memory isn't an issue. I don't see how questioning that is having a dig at you.

Quote: "That makes no sense, as you well know."

So what's this now with you randomly attacking me? Why would you think I'm trying to have a dig at you? I have absolutely no problem with you.

Quote: "had you not made your useless post we wouldnt be having this conversation"

It doesn't matter, a single 'useless'(I already explained why it wasn't in this post) post does not warrant unnecessary abuse.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 22nd Jul 2007 19:35
Quote: "addressing Cash and DC would be redundant. They are entitled to their opinions. I do find it funny that they "suddenly" posted here out of the blue. I dont recall those two being in this particular forum much, but hey, "random" things happen I guess."

I keep up on most forum posts. I check this board and the FPSC board frequently, though I don't often post in them. What's funny about that?

You were out of line CR. Benjamin didn't troll. He did nothing wrong. If he calls you a name now then you've earned it. That's just the price of flying off the handle without a valid reason.


Come see the WIP!
James Bondo
18
Years of Service
User Offline
Joined: 12th Nov 2006
Location: Denmark
Posted: 22nd Jul 2007 20:27 Edited at: 22nd Jul 2007 20:27
Having a bit of knowledge of how windows is put together, no matter how crap or godlike your computer is, the amount of memory an application uses should be the same.

My guess is that psx looked in the corner of the process list which shows the total consumed physical memory of the entire system (windows and all running processes). And in that case, 192MB is very much reasonable. For comparison, my explorer with 6 open tabs is eating just under 80MB.

Now stop feeding the fire.

Using Dark GDK.NET
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 22nd Jul 2007 20:42
I'm slightly annoyed at what's gone off in this thread tbh. Irrespective of who or who isn't trolling, your post Benjamin was rather, well, unproductive. I'm marking this thread as flame bait until the thread returns to normality. If it persists, consider imminant slappage!

Paul.

Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 23rd Jul 2007 04:02 Edited at: 23rd Jul 2007 04:03
I don't know how constructive this is, but a DBP program run with a simple do/loop (presumably exactly what you are doing, but in C++) takes a mere 4,216k on my computer. I would assume that DarkGDK should run equal to or more efficient, though I guess this partly depends on your compiler. I'm not terribly good in that area, the only real compiler I've used is Borland 3.1 for compiling modified versions of the Wolfenstien 3D code. What little I've learned from that probably doesn't apply much to modern compilers, but Borland had a debugging system that could be compiled into it which took more memory (which was limited for this) which could be switched off. Do modern compilers have a similar debugging system? Is it possible this is what is eating the memory?

Sorry, I don't have DarkGDK, though I tend to run around all of the forums and saw this and thought I'd post my $0.02. Hopefully I can get DarkGDK soon, I've been planning to for awhile now but haven't bothered quite yet.

EDIT: I like the sound of 'slappage'...er...the word, not the result


Vote today and play the games!
psx
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location:
Posted: 23rd Jul 2007 13:49
Well, I've read all your posts, and what we have.

I'm using DarkGameSDK, not DarkGDK.
As I know it is the old version of DarkGDK.
Maybe DarkGameSDK works that way.

I'm sure that it takes 192MB, because I check memory usage with SysInternals ProcessExplorer.

Red Ocktober said that DGDK uses onle 14MB of RAM with almost empty environment.
Maybe I should move myself to DarkGDK?

Well thanks for your comments.
James Bondo
18
Years of Service
User Offline
Joined: 12th Nov 2006
Location: Denmark
Posted: 23rd Jul 2007 14:42
Im not sure where youre looking in Procexp. The only place i could find was if you double click a process and go to the Performance tab.

Working set physical memory is way higher than what it is in the regular process list. My previous example with my browser.
Windows process list: about 50MB
Sysinternals: about 72MB

But sysinternals show both reserved memory, shared memory and used memory. The working set is all those combined. The one called WS Private shows the exact same amount as Windows own.

Now just for the heck of it, i tried compiling an empty DGDK.NET application. It uses 14MB aswell.

Using Dark GDK.NET
psx
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location:
Posted: 23rd Jul 2007 15:38
Yeah, I find the memory usage in Perfomance Graph Tab.
And now it shows 159MB of Private bytes
(Now I compiled my app in Release Mode)
It must be the way the DarkGameSDK works.

So DGDK uses 14MB.
I'll move to it asap.
Thanks for your help James
James Bondo
18
Years of Service
User Offline
Joined: 12th Nov 2006
Location: Denmark
Posted: 23rd Jul 2007 18:06
Performance graph shows the same as Working set... just as a graph.

Using Dark GDK.NET
cypher0
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location:
Posted: 27th Jul 2007 04:55
To answer the question at the top...
At a guess (I had similar issues):
You'll need to make sure the Windows message pump is being emptied. A system that sends lots of messages (eg. if you have too many background apps such as virus checkers running) to an app that doesn't dispose of it's message queue will soon pile on MBs (though I'm sure there should be a limit << 192Mb to this).

In .NET try System.Windows.Forms.Application.DoEvents() and/or System.Threading.Thread.Sleep(1). In C++ you might want to define a Windows callback procedure 'LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);' . . .
maybe.
psx
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location:
Posted: 27th Jul 2007 07:13
I'm sitting on C++, but I'm not so strong in WinAPI.
Yes, I'have the antivirus running in the background, and other apps.
So what should I do?
cypher0
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location:
Posted: 27th Jul 2007 20:34
Now I look at it a callback would be only useful if your app ran in a window. I use .NET's 'DoEvents', which from what I can gather calls some unknown .NET function 'ProcessMessages' and 'Thread.Sleep(1)'

C++ code might look something like this:

#include <windows.h>

. . .
// put a call to this in your main loop
void doevents()
{
MSG messages;
GetMessage (&messages, NULL, 0, 0);
TranslateMessage(&messages);
DispatchMessage(&messages);
}

I've never tried this outside of using a window, but according to MSDN it can be used to process thread messages as well as programs with a window). Might work, might not, I'm not too familiar with Windows API myself!
psx
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location:
Posted: 28th Jul 2007 09:44
OK. I'll try this or something like this.
Thank you.

Login to post a reply

Server time is: 2024-11-19 15:12:33
Your offset time is: 2024-11-19 15:12:33