digitalmars.D.learn - Can somebody explain this memory usage
- Saaa (8/8) Apr 01 2009 dmd 1.042 Phobos OpenGl + SDL (Derelict)
- Saaa (2/12) Apr 01 2009
- Denis Koroskin (4/21) Apr 02 2009 What's the problem? You allocate some memory, GC removes unreferenced ob...
- Saaa (3/28) Apr 03 2009 I always thought that memory usage would stay the same if you minimize a...
- BCS (5/18) Apr 02 2009 For one thing, most runtimes will never return memory the the OS so task...
- Saaa (3/7) Apr 03 2009 What is the resident set size called in winXP taskmanager (Or: which oth...
- torhu (7/10) Apr 03 2009 I believe 'Mem usage' is the resident size.
- Kagamin (1/1) Apr 04 2009 http://www.digitalmars.com/d/2.0/phobos/std_gc.html#minimize
dmd 1.042 Phobos OpenGl + SDL (Derelict) mem usage (winxp task manager) = 60MB, peak = 120MB gc.fullCollect is run just before mainloop, no change in mem usage after 10 minutes or so mem usage has stabilized at 70MB I have localized this to toStringz usage and think this is why tango's toStringz has a temp argument. When I minimize and normalize the window, mem usage goes to 4MB. I think I don't understand memory (de)allocations.. might be a bad thing :)
Apr 01 2009
I forgot to mention it is about a program I made :D (not the compiler itself or something)dmd 1.042 Phobos OpenGl + SDL (Derelict) mem usage (winxp task manager) = 60MB, peak = 120MB gc.fullCollect is run just before mainloop, no change in mem usage after 10 minutes or so mem usage has stabilized at 70MB I have localized this to toStringz usage and think this is why tango's toStringz has a temp argument. When I minimize and normalize the window, mem usage goes to 4MB. I think I don't understand memory (de)allocations.. might be a bad thing :)
Apr 01 2009
On Thu, 02 Apr 2009 10:08:52 +0400, Saaa <empty needmail.com> wrote:I forgot to mention it is about a program I made :D (not the compiler itself or something)I belive you have a bug in line 42.What's the problem? You allocate some memory, GC removes unreferenced objects.dmd 1.042 Phobos OpenGl + SDL (Derelict) mem usage (winxp task manager) = 60MB, peak = 120MB gc.fullCollect is run just before mainloop, no change in mem usage after 10 minutes or so mem usage has stabilized at 70MB I have localized this to toStringz usage and think this is why tango's toStringz has a temp argument.It's and OS who is swapping your memotry when you minimize your application, not Phobos/Tango or whatever.When I minimize and normalize the window, mem usage goes to 4MB. I think I don't understand memory (de)allocations.. might be a bad thing :)
Apr 02 2009
?I forgot to mention it is about a program I made :D (not the compiler itself or something)I belive you have a bug in line 42.I mean: calling toStringz(and format) a lot will allocate about 10MB of extra memory.What's the problem? You allocate some memory, GC removes unreferenced objects.dmd 1.042 Phobos OpenGl + SDL (Derelict) mem usage (winxp task manager) = 60MB, peak = 120MB gc.fullCollect is run just before mainloop, no change in mem usage after 10 minutes or so mem usage has stabilized at 70MB I have localized this to toStringz usage and think this is why tango's toStringz has a temp argument.I always thought that memory usage would stay the same if you minimize and then normilize an application.It's and OS who is swapping your memotry when you minimize your application, not Phobos/Tango or whatever.When I minimize and normalize the window, mem usage goes to 4MB. I think I don't understand memory (de)allocations.. might be a bad thing :)
Apr 03 2009
Reply to Saaa,dmd 1.042 Phobos OpenGl + SDL (Derelict) mem usage (winxp task manager) = 60MB, peak = 120MB gc.fullCollect is run just before mainloop, no change in mem usage after 10 minutes or so mem usage has stabilized at 70MB I have localized this to toStringz usage and think this is why tango's toStringz has a temp argument. When I minimize and normalize the window, mem usage goes to 4MB. I think I don't understand memory (de)allocations.. might be a bad thing :)For one thing, most runtimes will never return memory the the OS so task manager will never show a drop in memory. What you should be looking at is either the resident set size in task manager or some of the GC stats in the process.
Apr 02 2009
For one thing, most runtimes will never return memory the the OS so task manager will never show a drop in memory. What you should be looking at is either the resident set size in task manager or some of the GC stats in the process.What is the resident set size called in winXP taskmanager (Or: which other application should I use to check memory usage)? How can I chek memory stats? D1-phobos Thanks
Apr 03 2009
On 03.04.2009 11:34, Saaa wrote:What is the resident set size called in winXP taskmanager (Or: which other application should I use to check memory usage)? How can I chek memory stats? D1-phobos ThanksI believe 'Mem usage' is the resident size. I often use Process Explorer for tracking memory usage, where resident size is called 'working set'. Freely available from sysinternals.com. It's a great tool for performance tuning and general poking around. I can also recommend Process Monitor, for tracking system calls and various other stuff.
Apr 03 2009
http://www.digitalmars.com/d/2.0/phobos/std_gc.html#minimize
Apr 04 2009
That's D1 ; ) "Kagamin" <spam here.lot> wrote in message news:gr7taq$2u2j$1 digitalmars.com...http://www.digitalmars.com/d/2.0/phobos/std_gc.html#minimize
Apr 04 2009