Posts

Showing posts with the label sequential allocation

Difference between sequential allocation and linked allocation

Sequential allocation Linked allocation Static in nature. Dynamic in nature. Required to estimate the capacity of the structure. Not required. All memory locations are consecutive in nature. Therefore computed addressing is possible. Need not be. It works based on pointer addressing. Two logically adjacent elements are also physically adjacent. Not necessarily. Therefore each data element should hold the address of its next logically adjacent element. This can be a bottleneck problem. Support direct accessing or addressing of data. Sequential addressing or accessing of data. In a strict sense, deletion, and insertion operations are prohibited. Insertion and deletion operation is possible and is straight forward. Splitting and merging operation is also prohibited. However, these can be realized by data movement with extra memory allocation. This can be sometimes a bottleneck problem. Possible and straight forw...

Difference between sequential allocation and dynamic allocation

Sequential allocation Dynamic allocation Static in nature. Dynamic in nature. Allocation of memory sequential Allocation is not necessarily sequential. The elements which are logically adjacent are supposed to be physically adjacent. Need not be. No such requirement for additional memory. Each data element is supposed to have the address of the next data element (adjacent). They can require additional memory. This shall be a bottleneck problem sometime. Permit to direct accessing of data elements. It works based on “computed addressing”. Permits only sequential accessing of data elements as it works based on stored addressing. Insertion and deletion operations are not strictly permitted. However logical realization is possible. It is either with the support of the pointer variable or with the support of data movements. Insertion and deletion operation is permitted and t...