

(This post should probably be moved to the Linux/Unix forum.)Īs I suggested before, "ipcs -m" will display the shared-memory segments currently in use. When memory is needed for other purposes, it's withdrawn from these uses. This is because the OS tries to allocate any unused memory to cache and tmpfs. A casual observation will suggest that almost all Linux systems are deficient of free memory.

Note that it's fairly difficult to interpret Linux memory statistics. I doubt there's really much reason to monitor shared memory, outside of curiosity. Under Linux, shared memory is backed by the swap partition.

That is, it's no more precious than "normal" memory. So, it's not a limited resource that is easily depleted. (Older versions of Windows had a limited pool of shared memory.) Any memory can be made into shared memory - it's just a matter of the OS flipping some bits that make it available to map-in to other processes. On modern operating systems, there's no specific shared-memory "pool". The only difference is that each chunk of shared memory has a name (or "key") and it's possible for another application to map the same shared memory, by referencing the key. An application acquires shared memory by making a system call similar to what it would make to acquire conventional memory. It's a chunk of memory that can be shared by multiple processes. Not sure what "left out" shared memory is. Yes, it is a linux system and i want to display used and left out shared memory.
