Basically I need to have two lists, one of which keeps the list of empty memory holes by storing the starting point and the size of each hole. The other one, keeps information about various processes (while there is no actual process data, rather just the id and starting location and size).
So, I understand that I will need to have two structs, each of which defines the "hole" and the "process". I will need to have two lists to store these objects.
What I don't understand, is how to "initialize memory". For example, if the user wants to initialize(5000 bytes), what should the initialize method do in respect to the two lists?
You just empty the process list (since no memory is allocated) and create a single hole from address 0 to address 4999 (since those addresses are empty).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With