Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Java SWT Minimized-Shell RAM Usage
Java SWT Minimized-Shell RAM Usage [message #466373] Mon, 09 January 2006 19:20 Go to next message
Eclipse UserFriend
Originally posted by: j-hannemann.arcor.de

Hello there ...

I hope someone can help me please ?

I am trying to start a Java SWT Shell minimized as described :
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet27.java?rev=HEAD&a mp;content-type=text/vnd.viewcvs-markup
(or http://www.eclipse.org/swt/snippets/ -> Shell -> open a shell
minimized (iconified))

It works fine but when I look to the Task Manager of my Windows XP SP2 it
shows (depends on my Program, I know) about 20 MB of RAM used, although
its minimized.
Interesting is now that if I restore the Shell (setMinimizeed(false)) and
then minimize it again using the Windows default minimize-Button it only
takes about 1 MB RAM in the Task Manager !!!!
Nothing changing, just restore and minimize again decreased my RAM usage
from
20 MB to 1 MB !!!

Why ?? Can I REALLY minimize it just on a first attempt (to 1 MB usage) ?
I've tried to call System.gc() but this brings it only to 18,9 MB :(

I've got the usual Sun Java SDK 1.5.0_06 and SWT 3.2.3218

Please help me - I didn't find anything in the web for this issue !
Re: Java SWT Minimized-Shell RAM Usage [message #466378 is a reply to message #466373] Mon, 09 January 2006 20:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

It's not really important to have it smaller in this case. 20Meg is not
much these days. If it is minimized and not in use, Windows will swap it
out to disk for you automatically when it needs the space. If it doesn't
need the physical memory then there is no need to swap it out. It
doesn't really cause any problems to have memory allocated and no
programs actively using it or needing the physical memory it is using.

What is important with memory is the working set (i.e. how much is
needed in an active manner to do anything). You could have megs more
that are not actively being used and this doesn't cause any problems
until it is needed, because then it needs to be swapped in.

Actually windows does a drastic swap to disk when a minimize occurs (as
you already noted). It is not actually reducing its memory usage, only
reducing the physical memory usage. The virtual memory is still the same.

Probably Windows only does the massive swap on an explicit minimize. It
probably doesn't see it when it is created as minimized.


--
Thanks,
Rich Kulp
Re: Java SWT Minimized-Shell RAM Usage [message #466380 is a reply to message #466373] Mon, 09 January 2006 22:05 Go to previous messageGo to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Joerg Hannemann wrote:

> Interesting is now that if I restore the Shell (setMinimizeed(false)) and
> then minimize it again using the Windows default minimize-Button it only
> takes about 1 MB RAM in the Task Manager !!!!
> Nothing changing, just restore and minimize again decreased my RAM usage
> from
> 20 MB to 1 MB !!!
windows's joke
Re: Java SWT Minimized-Shell RAM Usage [message #466795 is a reply to message #466373] Tue, 17 January 2006 19:01 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=85072

"Joerg Hannemann" <j-hannemann@arcor.de> wrote in message
news:49a273afc1b1969f7b22865c663b97c5$1@www.eclipse.org...
> Hello there ...
>
> I hope someone can help me please ?
>
> I am trying to start a Java SWT Shell minimized as described :
>
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet27.java?rev=HEAD&a mp;content-type=text/vnd.viewcvs-markup
> (or http://www.eclipse.org/swt/snippets/ -> Shell -> open a shell
> minimized (iconified))
>
> It works fine but when I look to the Task Manager of my Windows XP SP2 it
> shows (depends on my Program, I know) about 20 MB of RAM used, although
> its minimized.
> Interesting is now that if I restore the Shell (setMinimizeed(false)) and
> then minimize it again using the Windows default minimize-Button it only
> takes about 1 MB RAM in the Task Manager !!!!
> Nothing changing, just restore and minimize again decreased my RAM usage
> from
> 20 MB to 1 MB !!!
>
> Why ?? Can I REALLY minimize it just on a first attempt (to 1 MB usage) ?
> I've tried to call System.gc() but this brings it only to 18,9 MB :(
>
> I've got the usual Sun Java SDK 1.5.0_06 and SWT 3.2.3218
>
> Please help me - I didn't find anything in the web for this issue !
>
Previous Topic:SWT table flickering
Next Topic:Get table data from SWT app to EXCEL
Goto Forum:
  


Current Time: Fri Mar 29 02:04:58 GMT 2024

Powered by FUDForum. Page generated in 0.02997 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top