---- '''Memory management in the Operating System''' The very important task of an OperatingSystem of providing the impression to each running application, that it has essentially unlimited linear memory at its disposal, when there is in fact only some 640KB, 16MB, 4GB plus possibly VirtualMemory on the HardDisk present. Some ways to accomplish this include: * use a "memory management unit" (MMU) to bounds-check (in hardware) addresses not currently swapped into real RAM * On systems that don't have a MMU, emulate it by bounds-checking (in software) addresses that might not be currently swapped into real RAM. A MMU does this bounds check on every RAM access, which slows down every RAM access. A JavaOS can run on hardware that doesn't have a MMU. While it needs to do bounds checks in software (each check much slower than hardware-accelerated MMU bounds checks), a SufficientlySmartVirtualMachine could (theoretically) optimize those checks out of the inner loop, so those checks only need to be done once (before beginning the loop) rather than millions of times inside the loop. This gives the CounterIntuitive result that using less hardware can (theoretically) make things faster. ---- '''Memory management in an application''' ... say something here about GarbageCollection, MemoryLeak, and other concepts that apply to application-level programming, rather than operating systems ... ---- See also MemoryCliff, MemoryExhaustion, StackOverflow GarbageCollection GrokMemoryAddressSpaces MemoryAsaProgrammingConcept OoFansReallyWantBubbleMemory ProtectedMemory ReadOnlyMemory SharedMemory SmallMemorySoftware TestForMemoryLeak LeastRecentlyUsed MemoryLeak ---- CategoryOrganization