On 6 Nov 2012, at 11:01, Nick Rogers <roger...@mac.com> wrote:

> Hi,
> 
> Thanks for the replies.
> I was trying to achieve what essentially "free memory" apps on the Mac 
> AppStore do.
> The RAM usage can be divided into four parts as shown in Activity Monitor.
> 1. Free
> 2. In-active
> 3. Active
> 4. Wired
> 
> When I used my earlier app to allocate memory equal to free + inactive bytes, 
> for the execution of the program it used to make the system less responsive 
> for a few seconds and on release and quitting the app, most of the inactive 
> memory would shift under free.
> 
> e.g. if free is 1GB and inactive is 1.5GB, then after run, free would be 
> 2.45GB and inactive just 50MB.

Why on earth would you want to release inactive memory?  This is memory that is 
in use by applications, just ones that haven't been scheduled in for a while.  
This RAM IIRC is automatically paged out to disk, so that if it is needed it 
can simply be overwritten, just like free memory, but has the side benefit that 
if it's not overwritten, then the inactive applications  can be brought back to 
life very fast.

Freeing it all would not gain anything, but would cause inactive apps to take 
much longer to return to the foreground.

As an aside - "free" memory is a bad thing – having free memory means your 
system is not using all the RAM it has available to make things nice and fast.  
I fully expect my machine to use "free" memory for things like disk caches if I 
currently do not need the RAM for applications.

Tom Davie
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to