lecture- memory allocationwhenever new node is createdmemory is allocated by the system this memory is taken from list of those memory locations which are free not allocated this list is called avail list similarlywhenever node is deletedthe deleted space becomes reusable and is added to the list of unused space to avail list this unused space can be used in future for memory allocation memory allocation is of two types static memory allocation dynamic memory allocation static memory allocationwhen memory is allocated during compilation timeit is called 'static memory allocationthis memory is fixed and cannot be increased or decreased after allocation if more memory is allocated than requirementthen memory is wasted if less memory is allocated than requirementthen program will not run successfully so exact memory requirements must be known in advance dynamic memory allocationwhen memory is allocated during run/execution timeit is called 'dynamic memory allocationthis memory is not fixed and is allocated according to our requirements thus in it there is no wastage of memory so there is no need to know exact memory requirements in advance garbage collectionwhenever node is deletedsome memory space becomes reusable this memory space should be available for future use one way to do this is to immediately insert the free space into availability list but this method may be time consuming for the operating system so another method is used which is called 'garbage collectionthis method is described belowin this method the os collects the deleted space time to time onto the availability list this process happens in two steps in first stepthe os goes through all the lists and tags all those cells which are currently being used in the second stepthe