Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old May 27, 2008, 07:25 AM   #1
Infrared
macrumors 65816
 
Infrared's Avatar
 
Join Date: Mar 2007
Real memory use in Mac OS X?

Quote:
Originally Posted by yellow View Post
True. I never, ever, ever put this machine to sleep, therefore, no sleepimage.
I have a couple of questions to ask, if I may:

(1) Is the value returned by that terminal command the same
as the sum of the RSIZE values in Activity Monitor?

(2) Is the value returned the amount of real memory in use by
the OS?

Thanks.

[EDIT]

Hmm.. googling around a bit it looks like /var/vm is the swap file.
So forget those questions were ever asked
Infrared is offline   0
Old May 27, 2008, 07:33 AM   #2
yellow
Demi-God (Moderator)
 
yellow's Avatar
 
Join Date: Oct 2003
Location: I love you, food.
1) No, I don't think so. Just looking at top right now, if I do a quick add up of RSIZE values, it's significantly larger than my current swap file size, which is only 64MB.

2) No, I don't think so. From what I understand of swap, the memory management (in Tiger+) will start out by creating smaller chunks of files to use as swap early on. As uptime, usage, and need grows, the chunks will be larger and larger, but always in octet multipliers (am I expressing that right?).. 64MB, 128MB, 512MB, 1024MB, etc.

Though I don't know if it actually gets to 1GB or higher.

Quote:
Originally Posted by Infrared View Post
[EDIT]

Hmm.. googling around a bit it looks like /var/vm is the swap file.
So forget those questions were ever asked
D'oh!
__________________
WWJS: What would Jesus shoot?
TRGCS
yellow is offline   0
Old May 27, 2008, 07:49 AM   #3
Infrared
Thread Starter
macrumors 65816
 
Infrared's Avatar
 
Join Date: Mar 2007
Quote:
Originally Posted by yellow View Post
1) No, I don't think so. Just looking at top right now, if I do a quick add up of RSIZE values, it's significantly larger than my current swap file size, which is only 64MB.

2) No, I don't think so. From what I understand of swap, the memory management (in Tiger+) will start out by creating smaller chunks of files to use as swap early on. As uptime, usage, and need grows, the chunks will be larger and larger, but always in octet multipliers (am I expressing that right?).. 64MB, 128MB, 512MB, 1024MB, etc.

Though I don't know if it actually gets to 1GB or higher.

D'oh!
Ok, then. That still leaves the pesky question of how one finds out how
much real memory is actually in use.

I'm interested for this reason: there is 4GB of RAM in this Mac. However,
under Vista only 2.81GB is shown as available. The explanation is that
some memory addresses are used to address other devices, e.g., PCI
cards. And that means the memory at those addresses can't be addressed,
can't be used, and so isn't available. Bah!

That's under Vista. But the interesting thing to me is how much memory
is available for use under OS X? To find out, I'd hoped to max out the use
of real memory, and work out how much real memory is used then. That
amount should be the amount of memory available to the OS and what is
running under OS. The only difficulty is I can't find a way of determining
how much real memory is in use!

The sum of RSIZE values might get close, but I'm not sure everything that
accounts for the memory used is in that Activity Monitor list.
Infrared is offline   0
Old May 27, 2008, 08:08 AM   #4
yellow
Demi-God (Moderator)
 
yellow's Avatar
 
Join Date: Oct 2003
Location: I love you, food.
If you have 4GB, Vista should see up to 3GB if you haven't installed SP1, and all 4GB if you have installed SP1. Seems odd that you'd only see 2GB.

"Active" in Activity Monitor is how much real, wired memory is in use. But if you mean real in wired + vm.. I'm not sure. But maximizing RAM usage is going to be a pointless exercise in Mac OS X as all the memory management is handled automagically and isn't changeable by the user. The only you can do as a user is renice a process to give it higher precedence.
__________________
WWJS: What would Jesus shoot?
TRGCS
yellow is offline   0
Old May 27, 2008, 09:07 AM   #5
Infrared
Thread Starter
macrumors 65816
 
Infrared's Avatar
 
Join Date: Mar 2007
Quote:
Originally Posted by yellow View Post
If you have 4GB, Vista should see up to 3GB if you haven't installed SP1, and all 4GB if you have installed SP1. Seems odd that you'd only see 2GB.
Firstly, I'm using 64-bit SP1 Vista. Secondly, I'm referring to the
amount that is available for use. With SP1, there is a change in
reporting, but the amount available for use is still likely to be less
than 4GB:

http://support.microsoft.com/kb/946003

How much is available depends on Apple's chipset and the BIOS
(i.e., CSM) implementation.

Quote:
Originally Posted by yellow View Post
"Active" in Activity Monitor is how much real, wired memory is in use. But if you mean real in wired + vm.. I'm not sure. But maximizing RAM usage is going to be a pointless exercise in Mac OS X as all the memory management is handled automagically and isn't changeable by the user. The only you can do as a user is renice a process to give it higher precedence.
I wrote a small C program to gobble up RAM through repeated mallocs.
Infrared is offline   0
Old May 27, 2008, 09:21 AM   #6
yellow
Demi-God (Moderator)
 
yellow's Avatar
 
Join Date: Oct 2003
Location: I love you, food.
Quote:
Originally Posted by Infrared View Post
I wrote a small C program to gobble up RAM through repeated mallocs.
I see. Well, I'm sure there's much more information about memory management at http://developer.apple.com
__________________
WWJS: What would Jesus shoot?
TRGCS
yellow is offline   0
Old May 27, 2008, 09:39 AM   #7
Infrared
Thread Starter
macrumors 65816
 
Infrared's Avatar
 
Join Date: Mar 2007
Quote:
Originally Posted by yellow View Post
I see. Well, I'm sure there's much more information about memory management at http://developer.apple.com
Indeed, if one has a lifetime to spare searching

It's common knowledge in the PC world that the RAM installed isn't
necessarily the RAM you get:

http://www.codinghorror.com/blog/archives/000811.html

Don't you think it's odd this is so rarely discussed in the OS X world?

Please don't take this as Mac bashing. I love using this Mac and OS X is
so much snappier than Windows. But I'm curious about this memory thing.
Infrared is offline   0
Old May 27, 2008, 09:40 AM   #8
flopticalcube
macrumors G4
 
flopticalcube's Avatar
 
Join Date: Sep 2006
Location: In the velcro closure of America's Hat
Quote:
Originally Posted by Infrared View Post
Indeed, if one has a lifetime to spare searching

It's common knowledge in the PC world that the RAM installed isn't
necessarily the RAM you get:

http://www.codinghorror.com/blog/archives/000811.html

Don't you think it's odd this is so rarely discussed in the OS X world?

Please don't take this as Mac bashing. I love using this Mac and OS X is
so much snappier than Windows. But I'm curious about this memory thing.
What Mac are you using?
__________________
Read the Rules / Search the Forums / Use a Descriptive Title
Mac Won't Boot?
flopticalcube is offline   0
Old May 27, 2008, 09:43 AM   #9
yellow
Demi-God (Moderator)
 
yellow's Avatar
 
Join Date: Oct 2003
Location: I love you, food.
Quote:
Originally Posted by Infrared View Post
Don't you think it's odd this is so rarely discussed in the OS X world?
Not really, no.
But I'm not a developer and at this point in the evolution of technology, RAM is cheap and "more is better".




EDIT: FYI, I moved these posts to their own thread.
__________________
WWJS: What would Jesus shoot?
TRGCS
yellow is offline   0
Old May 27, 2008, 10:01 AM   #10
Infrared
Thread Starter
macrumors 65816
 
Infrared's Avatar
 
Join Date: Mar 2007
Quote:
Originally Posted by yellow View Post
Not really, no.
But I'm not a developer and at this point in the evolution of technology, RAM is cheap and "more is better".
Indeed. But if more is better, then it would be nice
to know if one has more or less than one thought

Quote:
Originally Posted by yellow View Post
EDIT: FYI, I moved these posts to their own thread.
Good idea!
Infrared is offline   0
Old May 27, 2008, 10:26 AM   #11
yellow
Demi-God (Moderator)
 
yellow's Avatar
 
Join Date: Oct 2003
Location: I love you, food.
Seems you already have another one on basically the same issue. No reason not to let the discussion continue there.

http://forums.macrumors.com/showthread.php?t=489727
__________________
WWJS: What would Jesus shoot?
TRGCS
yellow is offline   0

Closed Thread
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Exchange Google on iPhone. What do you use in Mac OS X? RichardF iPhone 4 Nov 1, 2011 08:12 PM
Gmail + Exchange on iPhone. What do you use in Mac OS X? RichardF iPhone 0 Nov 1, 2011 03:32 PM
Error Message: File locked. Currently in use by Mac IndianSteveJobs MacBook Pro 0 Jul 7, 2011 08:39 AM
how to disable default screen capturing in mac os x Monaj Mac OS X 1 Mar 16, 2011 12:53 AM
Memory Modification in Mac OS X bobindashadows Mac Applications and Mac App Store 0 May 27, 2003 10:00 PM


All times are GMT -5. The time now is 09:26 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC