e01.org

Memory management

Memory management (also dynamic memory management, dynamic storage allocation, or dynamic memory allocation) is a form of resource management applied to computer memory. The essential requirement of memory management is to provide ways to dynamically allocate portions of memory to programs at their request, and free it for reuse when no longer needed. This is critical to any advanced computer system where more than a single process might be underway (multitasking) at any time. Several methods have been devised that increase the effectiveness of memory management. Virtual memory systems separate the memory addresses used by a process from actual physical addresses, allowing separation of processes and increasing the size of the virtual address space beyond the available amount of RAM using paging or swapping to secondary storage. The quality of the virtual memory manager can have an extensive effect on overall system performance. The system allows a computer to appear as if it may...

Memory management (also dynamic memory management, dynamic storage allocation, or dynamic memory allocation) is a form of resource management applied to computer memory. The essential requirement of memory management is to provide ways to dynamically allocate portions of memory to programs at their request, and free it for reuse when no longer needed. This is critical to any advanced computer system where more than a single process might be underway (multitasking) at any time. Several methods have been devised that increase the effectiveness of memory management. Virtual memory systems separate the memory addresses used by a process from actual physical addresses, allowing separation of processes and increasing the size of the virtual address space beyond the available amount of RAM using paging or swapping to secondary storage. The quality of the virtual memory manager can have an extensive effect on overall system performance. The system allows a computer to appear as if it may have more memory available than physically present, thereby allowing multiple processes to share it. In some operating systems, e.g. Burroughs/Unisys MCP, and OS/360 and successors, memory is managed by the operating system. In other operating systems, e.g. Unix-like operating systems, memory is managed at the application level. Memory management within an address space is generally categorized as either manual memory management or automatic memory management. == Manual memory management == The task of fulfilling an allocation request consists of locating a block of unused memory of sufficient size. Memory requests are satisfied by allocating portions from a large pool of memory called the heap or free store. At any given time, some parts of the heap are in use, while some are "free" (unused) and thus available for future allocations. In the C language, the function which allocates memory from the heap is called and the function which takes previously allocated memory and marks it as "free" (to be used by future allocations) is called . Several issues complicate the implementation, such as external fragmentation, which arises when there are many small gaps between allocated memory blocks, which invalidates their use for an allocation request. The allocator's metadata can also inflate the size of (individually) small allocations. This is often managed by chunking. The memory management system must track outstanding allocations to ensure that they do not overlap and that no memory is ever "lost" (i.e. that there are no "memory leaks"). ==== Fixed-size blocks allocation ==== Fixed-size blocks allocation, also called memory pool allocation, uses a free list of fixed-size blocks of memory (often all of the same size). This works well for simple embedded systems where no large objects need to be allocated but suffers from fragmentation especially with long memory addresses. However, due to the significantly reduced overhead, this method can substantially improve performance for objects that need frequent allocation and deallocation, and so it is often used in video games.

References

  1. ^ alloca(3) – Linux Programmer's Manual – Library Functions from Manned.org Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  2. ^ "_malloca" . Microsoft CRT Documentation . 26 October 2022. Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  3. ^ "gnulib/malloca.h" . GitHub . Retrieved 24 November 2019 . Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  4. ^ "glibc/include/alloca.h" . Beren Minor's Mirrors. 23 November 2019. Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  5. ^ Tanenbaum, Andrew S. (1992). Modern Operating Systems . Englewood Cliffs, N.J.: Prentice-Hall. p. 90. ISBN 0-13-588187-0 . Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  6. ^ Except on the Model 67 Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  7. ^ "Virtual Storage Layout" (PDF) . Introduction to OS/VS2 Release 2 (PDF) . Systems (first ed.). IBM . March 1973. p. 37. GC28-0661-1 . Retrieved July 15, 2024 . Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  8. ^ "Main Storage Allocation" (PDF) . IBM Operating System/360 Concepts and Facilities (PDF) . IBM Systems Reference Library (First ed.). IBM Corporation. 1965. p. 74 . Retrieved Apr 3, 2019 . Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  9. ^ However, the run-time environment for a language processor may subdivide the memory dynamically acquired from the operating system, e.g., to implement a stack. Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  10. ^ In some operating systems, e.g., OS/360 , the free storage may be subdivided in various ways, e.g., subpools in OS/360 , below the line, above the line and above the bar in z/OS . Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  11. ^ Not to be confused with the unrelated heap data structure. Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  12. ^ Jonathan Bartlett. "Inside Memory Management" . IBM DeveloperWorks . Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  13. ^ A simplistic implementation of these two functions can be found in the article "Inside Memory Management". [ 4 ] Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  14. ^ a b Detlefs, D.; Dosser, A.; Zorn, B. (June 1994). "Memory allocation costs in large C and C++ programs" (PDF) . Software: Practice and Experience . 24 (6): 527– 542. doi : 10.1002/spe.4380240602 . S2CID 14214110 . Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  15. ^ OS360Sup , pp. 82 . Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  16. ^ OS360Sup , pp. 82 –85. Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  17. ^ OSVS1Dig , p. 2.37-2.39 . Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  18. ^ The Descriptor (PDF) . Burroughs Corporation . February 1961. Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  19. ^ Program Logic: IBM System/360 Operating System MVT Supervisor (PDF) . IBM Corporation. May 1973. pp. 107– 137 . Retrieved Apr 3, 2019 . Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  20. ^ a b "Unisys MCP Managing Memory" . System Operations Guid . Unisys . Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  21. ^ Waychoff, Richard. "Stories About the B5000 and People Who Were There" (PDF) . Computer History Museum . Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  22. ^ Silberschatz, Abraham ; Galvin, Peter B. (2004). Operating system concepts . Wiley. ISBN 0-471-69466-5 . Wikipedia revision 1369222484, retrieved 2026-11-21 · 1795215600.0
  23. Several methods have been devised that increase the effectiveness of memory management. Virtual memory systems separate the memory addresses used by a process from actual physical addresses, a . · 1786575600.0
  24. Program Logic: IBM System/360 Operating System MVT Supervisor . IBM Corporation . May 1973. · 1786575600.0
  25. Introduction to OS/VS2 Release 2 . March 1973. · 1786575600.0
  26. IBM Operating System/360 Concepts and Facilities . IBM Corporation . 1965. · 1786575600.0
  27. Jonathan Bartlett. Inside Memory Management . IBM DeveloperWorks . · 1786575600.0
  28. Memory allocation costs in large C and C++ programs . · 1786575600.0
  29. _malloca . Microsoft CRT Documentation . 26 October 2022. · 1786575600.0
  30. gnulib/malloca.h . GitHub . retrieved 24 November 2019 · 1786575600.0
  31. glibc/include/alloca.h . Beren Minor's Mirrors . 23 November 2019. · 1786575600.0
  32. Waychoff, Richard. Stories About the B5000 and People Who Were There . · 1786575600.0
  33. The Descriptor . · 1786575600.0
source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Memory management". 1786632041. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1369222484

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·