flat assembler
Message board for the users of flat assembler.

Index > Windows > Saving Memory...?

Author
Thread Post new topic Reply to topic
itsnobody



Joined: 01 Feb 2008
Posts: 93
Location: Silver Spring, MD
itsnobody
Seems like any Windows program I make uses around 350k of memory when I check the Task Manager...how do I lower this?

I mean even a simple program with just a message loop and nothing else uses 344k of memory...

Anyone know how to use the least amount of memory possible?
Post 14 Feb 2008, 03:13
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17341
Location: In your JS exploiting you and your system
revolution
itsnobody wrote:
Anyone know how to use the least amount of memory possible?
Simple answer, don't run Windows. If you are really running out of memory and need an extra few KB then just buy another stick of RAM.
Post 14 Feb 2008, 03:51
View user's profile Send private message Visit poster's website Reply with quote
itsnobody



Joined: 01 Feb 2008
Posts: 93
Location: Silver Spring, MD
itsnobody
revolution wrote:
itsnobody wrote:
Anyone know how to use the least amount of memory possible?
Simple answer, don't run Windows. If you are really running out of memory and need an extra few KB then just buy another stick of RAM.


I'm not running out of memory, but when I view the task manager I see some other programs using less than 344k of memory, like 92k of memory....just wondering how to make a Windows Program that doesn't waste memory
Post 14 Feb 2008, 04:20
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17341
Location: In your JS exploiting you and your system
revolution
The memory is not necessarily wasted. Windows needs to keep a number of tables so that it can properly close things if the app exits without cleanup. Also, the DLL memory is shared with the other tasks and only uses up the memory once but it will appear in the memory maps of multiple processes.

The figure given in task manager is the running set size, not the actual memory allocation. That figure changes depending upon how active the task is. Unused pages of memory are marked as swappable and removed from the process memory map.
Post 14 Feb 2008, 06:10
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Get sysinternals' Process Explorer, it has better (and better named) stats than taskmgr. Also, start->run perfmon.msc (unless you're on win9x).
Post 14 Feb 2008, 12:21
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.