Double Linked List

Now one issue that linked lists have is that while it’s really easy to move to the next element in your list, moving backwards to find the previous item is really challenging. You literally have to start back at the beginning and move through every element, until you reach the one before where you just…

Segmentation and Paging

With paging, all components of a program, including code, static data, the stack, and other data structures, are combined into one contiguous address space divided into fixed-size pages. Segmentation addresses the problem by providing multiple logical address spaces for each process, where each segment can have a different size. A segment is a variable-size block of a…

Memory Paging

The main disadvantage of dividing memory into variable partitions is external fragmentation, which requires the searching of memory for holes large enough to satisfy each request. As we’ve mentioned previously, swapping or compaction is necessary when no hole large enough is available. A page is a fixed-size contiguous block of a logical address space identified by the…

Linked Lists

Since arrays must be made of a contiguous section of memory, large arrays become harder to allocate memory for them, especially as the application becomes more complex. Therefore, developers will often look to using something like a linked list. A linked list incorporates a custom data type. One of the data types which makes it…

Requirements for Efficient Memory Management

Logical vs Physical memory A computer’s physical memory (RAM) is a hardware structure consisting of a linear sequence of words that hold a program during execution. A word is a fixed-size unit of data. The size of a word is reflected in many aspects of a computer’s structure and operation. A typical word size is 4 to 8 bytes…