Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TopWindow&PopUp, TrayIcon » [FIX] resizing eats memory
icon14.gif  [FIX] resizing eats memory [message #22698] Thu, 06 August 2009 09:48 Go to next message
loki is currently offline  loki
Messages: 36
Registered: October 2007
Member
Hello,

when I resize theIde or other U++ application, then it needs more and more memory which is not freed after stoping resizing. Is this normal? Why is this?

I resize using the border of the window.

WinVista 64Bit
Upp 1460

For example I have an application wich uses in maximized mode 2,3MB of memory. After resizing a bit, It uses more then 10MB. And more if I go on with resizing.

if compiled with gcc, then the memory usage grows faster as if compiled with msvc.

[Updated on: Mon, 10 August 2009 01:26]

Report message to a moderator

Re: resizing eats memory [message #22728 is a reply to message #22698] Sun, 09 August 2009 17:28 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
What a nasty bug! (And quite critical one).

Well, it is not so bad, I believe it should have had stopped after eating 32MBs (can you check before syncing the fix?).

The cause was unfortunate interaction between MakeImage cache, its adaptive "max cache size" algorithm and Windows driven resizing of window; adaptive code required to be called in "job is done" situation, which was when in U++ message loop input queue is empty - it then increased maximum cache size to actual size needed in processing events.

However, when resizing, we are not in U++ loop, but windows performs its own, only calling WM_PAINT. Means adaptive algorithm had no chance to optimize and cache maxed out to upper limit - which, to make things worse, was slightly incorrectly set to 4 megapixels of Image data, which usually results in 32MB of total data.

All should fine now (on svn in one hour).

Mirek

[Updated on: Sun, 09 August 2009 17:31]

Report message to a moderator

icon14.gif  Re: resizing eats memory [message #22731 is a reply to message #22728] Sun, 09 August 2009 19:07 Go to previous message
loki is currently offline  loki
Messages: 36
Registered: October 2007
Member
Thanks for the fix Smile

I tried out how long the memory grows. Interesstingly it seems to stop at 16MB. At least it is growing then. But very slow. And I do not want to resize the window an hour long.

svn works perfect Very Happy

[Updated on: Mon, 10 August 2009 01:24]

Report message to a moderator

Previous Topic: Double-click a file and open the App
Next Topic: PromptOK & C, with topmost
Goto Forum:
  


Current Time: Tue Apr 16 19:58:06 CEST 2024

Total time taken to generate the page: 0.02124 seconds