image
image

|


Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old January 7th, 2007, 01:29 PM
alra111's Avatar
Macaholic
 
Join Date: Dec 2006
Location: Miami, FL
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
alra111 is on a distinguished road
Wink Why do apps use so much memory?

According to my Activity Monitor, the Calculator DashboardClient is using 6.45 MB of real memory and 338.36 MB of virtual memory. Why does a calculator program need all that memory?

It seems that as memory sizes are growing, even simple little programs are becoming bigger and bigger memory hogs.

Alra111
__________________
Alra Website
Mac Mini (PowerPC) • 256 MB RAM •• iMac (Intel) 20" Mac • OS X Version 10.5.2 • 2.33 GHz Intel Core 2 Duo • 1 GB 667 MHz RAM • ATI Radeon X1600 w/256 MB VRAM • My Book 500 GB• Time Capsule 1 TB • iPhone 16 GB • iPhone 8 GB • iPod Touch 32 GB • iPod Nano 2 GB x 2
Jack Johnson rules!
Reply With Quote
  #2  
Old January 7th, 2007, 02:16 PM
Registered User
 
Join Date: Sep 2005
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
AkleyMac is on a distinguished road
I'm not really sure, but I would imagine that it's to do with all of the extra stuff that's in an application's framework. For example, a calculator doesn't just need simple arithmetic and a picture for each button etc, it also needs all of the code that allows it to interface with the window manager and the hundreds of other components inside the system.

Also, a classes in a programming architechture such as Cocoa for example contain much more functionality than is used in such applications. I'm not sure how these classes are compiled, but it wouldn't surprise me if there is a huge amount of memory being used to store data that is never even used.

Just a guess,
Tom
Reply With Quote
  #3  
Old January 7th, 2007, 03:48 PM
Lt Major Burns's Avatar
"Dicky" Charlteston-Burns
 
Join Date: Jan 2005
Location: Manchester
Posts: 3,329
Thanks: 0
Thanked 0 Times in 0 Posts
Lt Major Burns will become famous soon enough
my itunes is currently using 96mb ram on my 2gb ram G5, whereas on my 640mg iBook G3, it uses a lot less.

i think OSX's memory managemnt allows programs to spread around, until it's need somewhere else. also, Calculator uses brushed metal, which is a shaded texture (it is rendered flexibly - it's not a prefixed look), which may account why it's a bit more resource hungry than a calculator should be...
__________________
Dual 1.8GHz G5 2GB, 1TB, Radeon 9600XT 128MB, 10.5
20" Apple Cinema Display + Dell 2005FPW 20" dual-head
iBook G3 700MHz
640MB, 40GB, Rage128 16MB, 10.4, dying battery
Reply With Quote
  #4  
Old January 7th, 2007, 03:59 PM
caribooyj's Avatar
... somewhere in B.C. ...
 
Join Date: Jan 2007
Location: British Columbia
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
caribooyj is on a distinguished road
"...even simple little programs are becoming bigger and bigger memory hogs."

I've had a similar question a couple of days ago, but unfortunately no reply so far... can't believe the memory usage of this small app... here's my original post:

"I've noticed that running iSafe Light (password keeping program) is using up a lot of the CPU. % is showing anywhere between 65 and 75 in my activity monitor, while other programs are much less, e.g:
Google Video Player - 5.2
Word - 2.6
Bon Echo - 1.5
and so on....
Is there anything wrong with the application? I thought its just a safe place to keep my passwords and serial number info... should I be concerned?"
__________________

t0m
Mac Book Pro 17"
2.16 GHz Intel Core Duo
2 GB 667 MHz DDR2 SDRAM, Mac OS X 10.4.9
Reply With Quote
  #5  
Old January 7th, 2007, 05:05 PM
Registered User
 
Join Date: Jul 2005
Posts: 822
Thanks: 0
Thanked 0 Times in 0 Posts
simbalala is on a distinguished road
Quote:
Originally Posted by caribooyj View Post
"I've noticed that running iSafe Light (password keeping program) is using up a lot of the CPU. % is showing anywhere between 65 and 75 in my activity monitor, while other programs are much less, e.g:
Google Video Player - 5.2
Word - 2.6
Bon Echo - 1.5
and so on....
Is there anything wrong with the application? I thought its just a safe place to keep my passwords and serial number info... should I be concerned?"
Yep, that app is broken, there’s no way it should be using that much CPU, especially if it’s idle. You should send a note to the developer.
Reply With Quote
  #6  
Old January 7th, 2007, 05:19 PM
caribooyj's Avatar
... somewhere in B.C. ...
 
Join Date: Jan 2007
Location: British Columbia
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
caribooyj is on a distinguished road
Interesting... thanks for the advice, I was wondering what was going on...
__________________

t0m
Mac Book Pro 17"
2.16 GHz Intel Core Duo
2 GB 667 MHz DDR2 SDRAM, Mac OS X 10.4.9
Reply With Quote
  #7  
Old January 8th, 2007, 12:11 AM
caribooyj's Avatar
... somewhere in B.C. ...
 
Join Date: Jan 2007
Location: British Columbia
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
caribooyj is on a distinguished road
"...You should send a note to the developer."

I did:

"...thank you for the information you have provided us. The issue could be caused by rosetta emulation because iSafe is not native to the intel chip set used in your Macbook Pro. However we will be looking into this issue to see what is possible to reduce the CPU load and will release an update to resolve this issue."
__________________

t0m
Mac Book Pro 17"
2.16 GHz Intel Core Duo
2 GB 667 MHz DDR2 SDRAM, Mac OS X 10.4.9
Reply With Quote
  #8  
Old January 8th, 2007, 12:57 AM
Mikuro's Avatar
Crotchety UI Nitpicker
 
Join Date: Mar 2005
Posts: 2,448
Thanks: 2
Thanked 5 Times in 5 Posts
Mikuro is on a distinguished road
Well, Dashboard widgets are memory hogs because each one is like its own dedicated web browser.

But all OS X apps use quite a bit of RAM compared to the way things were in OS 9. I'm still not entirely sure why this is. Part of it surely has to do with the fact that unlike in OS 9, every app in OS X has its own protected memory space, and operates in its own largely-isolated environment. That means that where applications would share memory in OS 9, each app might have its own copy of that memory in OS X. This is a good thing; it keeps applications from stepping on each other's toes and it's what makes OS X darn near uncrashable.

That's certainly not all there is to it, though. I'm sure OS X's GUI plays a role. Every window in OS X is double-buffered and composited on the fly, which costs some RAM and CPU power but gives us cool things like Expos้. There are a lot of features like this built into OS X, and everything is a tradeoff.

Of course, sometimes the applications really are just not as efficient as they could be. Developers take the power they're given and they use it. In some cases, they use it to make their lives easier, resulting in less efficient programs that take a lot less time and effort to make. Again, it's a tradeoff. I doubt we'd have nearly as many cool programs as we do if software development were as hard as it once was.

But again, I'm not sure what all the reasons are. These are just a few, and I can't begin to say how they weigh against each other in practice. It still bugs me that an app that uses 1-2MB in OS 9 uses 15MB in OS X, but I've come to terms with the fact that the rules have changed.



As for the large "virtual memory" sizes, that's sort of a non-issue, since a lot of that IS shared. For example, right now Activity Monitor reports 6.75GB of VM usage, while my actual VM swap files total only 1GB. The more apps you have loaded, the larger this discrepancy will be. The virtual memory usage reported by Activity Monitor and the like are only really useful for developers debugging their apps, I think.
__________________
Mac mini — 1.25GHz G4, 1GB RAM — OS 10.5.2

I'm now a four-browser man. How on earth did this happen?!

Useful programs: PithHelmet, Butler, ffmpegX, VLC, Perian, Tofu, Wcalc
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 06:59 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.