[X-Unix] Memory Question

James Bucanek subscriber at gloaming.com
Tue Mar 30 21:27:45 PST 2004


William H. Magill wrote on Tuesday, March 30, 2004:
>"Inactive" is not a bad thing in and of itself.
>Some "process" has used (is using) memory and failed to release it.

No, "inactive" memory is just that.  Memory that hasn't been accessed in a while.  Inactive memory can be allocated, or unallocated.  It has nothing to do with releasing memory.

The Kernel periodically sweeps the VM map and marks pages of memory that have not been accessed recently as inactive.  It then preemptively pages out and frees memory to maintain an optimal balance between active and inactive pages.

Another reason that a page can be marked as inactive, is if it contains a known data but isn't allocated.  For instance, the file system buffers everything it reads from the disk in memory, then marks it as inactive.  This allows every block of free memory in your system to be used as a disk cache.  Even though the page is marked as unallocated+inactive, if you need that disk block again it can come from RAM instead.

<http://developer.apple.com/documentation/Performance/Conceptual/ManagingMemory/Concepts/AboutMemory.html>

______________________________________________________
James Bucanek       <mailto:privatereply at gloaming.com>



More information about the X-Unix mailing list